Add filename column using pandas | Python in finance #4

Edward Jones
May 14, 2021
Example of the automated process

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

--

--