How to read file data.parquet.gz and convert it into a pandas dataframe?
Below code is giving error:
Could not open Parquet input source '': Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.
df = pd.read_parquet('data.parquet.gz')
You file is an gzip archive, you can to read is like so:
import gzip
with gzip.open('data.parquet.gz', 'rb') as f:
df = pd.read_parquet(f)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.