I have 250 csv files in a folder, i used the following code to import them to a single dataframe:
files = "~/*.csv"
df = pd.concat([pd.read_csv(f, dtype='str') for f in glob.glob(files)], ignore_index=True)
My problem is i dont have date info inside any of the files, the date is mentioned in the filename like "LSH_190207" which is 7-Feb-2019.
Is there a way i can include this info in the dataframe while importing the files, preferably as index.
Or at least create a new column that would contain the file names, so i can later split & format it into date column.