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
I'd like to use Polars (in Python) to read multiple CSVs at once, using a glob pl.read_csv('*.csv'), but all those files have exactly the same structure, and are only identifiable via their respective filename.
It would be great if an add_filename option could be added to the read_csv/scan_csv functions.
If set, this would include an extra filename column in the resulting DataFrame/LazyFrame, so further processing can be done with this information.
The text was updated successfully, but these errors were encountered:
Problem description
I'd like to use Polars (in Python) to read multiple CSVs at once, using a glob
pl.read_csv('*.csv')
, but all those files have exactly the same structure, and are only identifiable via their respective filename.For now, my code is:
It would be great if an
add_filename
option could be added to theread_csv
/scan_csv
functions.If set, this would include an extra filename column in the resulting DataFrame/LazyFrame, so further processing can be done with this information.
The text was updated successfully, but these errors were encountered: