You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature request: read_csv/read_table/read_fwf - read multiple files with the same structure, applying the same parameters (skiprows, skipfooter, nrows) #12618
I think it would make sense to make read_csv(), read_table(), read_fwf() able to read multiple files with the same structure. It might be tricky to read multiple files into one string, especially when all of them have header line(s) and when you want to use the following parameters: skiprows, skipfooter, nrows.
The logic for (skiprows, skipfooter, nrows) is already implemented, so IMO it shouldn't be very difficult. The header parameter (if header exists) must be read/parsed only from the first (from one) file.
Of course one can always do something like:
df = pd.concat([pd.read_csv(f, **kwargs) for f in flist], ignore_index=True)
but it's not very efficient when working with big files.
In the last days there were plenty of similar questions stackoverflow.com, asking how to merge CSV files with the same structure.