In this video I explain and demonstrate another useful Pandas trick: how you can to concat (connect) multiple CSV files that are stored in the same directory very easily just by using Pandas and Glob modules in Python.

The video is splited in 2 parts:

  • Step 1. Generate list of CSV files (0:04)
  • Step 2. Concat multiple CSV files into one DataFrame by using glob, assign() and pd.concat() methods (1:39).

I assume this method should work not only with CSV files, but with other structured data files (Excel sheets, etc.) also.

I think this Pandas trick will be useful for data analysts and data scientist working with structured data in Python and save a lot of time by handling difficult and dirty data and how to pre-process it for your models.

Subscribe: https://www.youtube.com/c/VytautasBielinskas/featured

#pandas #dataframe

Join Multiple CSV Files into one Pandas DataFrame. QUICKLY
23.55 GEEK