Sushill

Kmarket (main)

Mar 13th, 2022 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import pandas as pd
  2. from functionalities import kalimati_market, date_header
  3.  
  4.  
  5. # initializing values and these values represent respective column of commodity price table:
  6. date = date_header()
  7. products = kalimati_market(0)
  8. units = kalimati_market(1)
  9. minimum = kalimati_market(2)
  10. maximum = kalimati_market(3)
  11. average = kalimati_market(4)
  12.  
  13. # pandas dataframes
  14. d = {'वस्तु': products, 'एकाइ': units, 'न्यूनतम': minimum, 'अधिकतम': maximum, 'औसत': average}
  15. df = pd.DataFrame(data=d)
  16. df.to_excel(f"{date}.xlsx", index=False)
  17.  
  18. print("Done!")
  19.  
  20.  
Add Comment
Please, Sign In to add comment