gouravgujariya commited on
Commit
0676e4c
1 Parent(s): 23141c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,7 +17,8 @@ class SalaryTracker:
17
  self.salary += amount
18
 
19
  def update_data(self, transaction):
20
- self.data = self.data.append({'Transaction': transaction, 'Salary': self.salary}, ignore_index=True)
 
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