Created
December 31, 2021 10:57
-
-
Save bruno-uy/446639118f0ad30a92500dddc799ff3b to your computer and use it in GitHub Desktop.
Read all csv.gz files from the current folder in a pandas DataFrame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.concat([pd.read_csv(f, compression="gzip") for f in os.listdir() if f.endswith(".gz")], ignore_index=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment