I have a list that looks like this:
['2016-01-05', '2017-02-03', '2018-01-25', ['File_2016.csv', 'File_2017.csv', 'File_2018.csv']]
Which is an output of a user entered field, and the partition of the data, where the first set of items ('2016-01-05', '2017-02-03', '2018-01-25') are the user entered fields, and the second set ('File_2016.csv', 'File_2017.csv', 'File_2018.csv') are the corresponding files.
What I'd like to do is create a dataframe that looks like this:
Date File
2016-01-05 File_2016.csv
2017-02-03 File_2017.csv
2018-01-25 File_2018.csv
My code looks like this:
my_list = [input('enter the start date for file %s: ' % i) for i in list(filenames)]
Where filenames is a list of the Files above, and I append filenames to the list after the above user inputs.
Is there a better way to do this?
Thank you!