Skip to content
Advertisement

how to load and save pandas data frame to excel .csv file

CODE:-

JavaScript

Now when I run the code I am getting this output. How to load this output into the excel as .csv file with the name as ’11-08-2022.csv’. And suppose if I run the code on 12-08-2022 then another .csv file should add in the same folder where first .csv file has saved and now the file name should be 12-08-2022……in this way when I run the code each time there should be one .csv file created with the name as todays date.

thank you.

Advertisement

Answer

first import libraries

JavaScript

to load data from csv file

JavaScript

example

JavaScript

to save data to csv file

JavaScript

file will be saved to your current directory

to save some other folder

JavaScript

example

JavaScript

in your case, you want something like this

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement