Spaces:
Sleeping
Sleeping
gouravgujariya
commited on
Commit
•
0676e4c
1
Parent(s):
23141c2
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,8 @@ class SalaryTracker:
|
|
17 |
self.salary += amount
|
18 |
|
19 |
def update_data(self, transaction):
|
20 |
-
|
|
|
21 |
|
22 |
def generate_report(self):
|
23 |
return self.data
|
|
|
17 |
self.salary += amount
|
18 |
|
19 |
def update_data(self, transaction):
|
20 |
+
new_data = pd.DataFrame({'Transaction': [transaction], 'Salary': [self.salary]})
|
21 |
+
self.data = pd.concat([self.data, new_data], ignore_index=True)
|
22 |
|
23 |
def generate_report(self):
|
24 |
return self.data
|