import pandas as pd df = pd.DataFrame({'Date':['11/05/19', '12/05/19', '19/05/19', '25/05/19', '26/05/19', '1/06/19', '2/06/16', '6/06/19', '7/06/19', '8/06/19'], 'Time Worked': [3, 3, 4, 3, 3, 4, 4, 4, 3, 3], 'Money Earned': [33.94, 33.94, 46, 33.94, 33.94, 46, 46, 46, 33.94, 33.94]}) df.head() # Adding more rows df2 = pd.DataFrame({'Date': ['10/06/19', '12/06/19', '14/06/19'], 'Time Worked': [3, 4, 3], 'Money Earned': [33.94, 46, 33.94]}) df2 df = df.append(df2, ignore_index=True, sort = False) df.head() Total_earnings = df['Money Earned'].sum() Total_time = df['Time Worked'].sum() print("You have earned total of ====>" ,round(Total_earnings), "CAD") print("---------------------------------------------------------------") print("You have worked for total of ====>", Total_time, "hours") df.plot(x ='Date', y='Money Earned', kind = 'bar') date = input("Enter the date you want to search ===> ") df[df['Date'].str.contains(date)] def payroll(): name = input("Enter the name of the employee: ==> ") hours = int(input("Enter the number of hours worked by the employeer ==> ")) rate = float(input("Enter the pay rate for one hour ==> ")) total_money = hours * rate print("The total money earned by ", name, "for working ", hours, "hours", "is ===> ", round(total_money), "CAD") payroll()