Member-only story
Add filename column using pandas | Python in finance #4
May 14, 2021
Data can be found: here
You create a for loop and perform the following manipulations per file:
- Read in the file
- Create a new column and assign the file name
- Create a date column based on the filename
- Append the file to a consolidated dataframe
Happy programming!
Cheers,
Ewoud