Skip to content

Instantly share code, notes, and snippets.

@bruno-uy
Created December 31, 2021 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruno-uy/446639118f0ad30a92500dddc799ff3b to your computer and use it in GitHub Desktop.
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
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