I am looking to convert a pandas dataframe into a csv and use a variable for the filename.
Here's the code:
companydf.to_csv(r'C:\Users\Admin\exports\test1.csv', index=False)
Instead of "test1" for the filename, I'd like to use a variable and have it followed by today's date.
Desired output:
file_name = example
companydf.to_csv(r'C:\Users\Admin\exports\example m/d/y.csv', index=False)