I have a python script that imports a df, processes it, and then outputs to a csv file. I'm using pandas.write_csv() to output the file.
I'm looking to standardize the manner in which my script names the output file. Specifically, I would like for the script to pull today's date as format: MMDDYYYY and insert that to the end of the CSV file.
outputfile = 'mypotentialfilename_MMDDYYYY.csv'
pd.write_csv(outputfile)
In the past, I've seen quick ways to insert a date into a text, but I cannot seem to find the code to review. Any help is appreciated.