liveBook · Manning

Parquet

As explained in The Well-Grounded Data Analyst

Parquet is a compressed columnar file format that preserves data types and is designed for efficient analytical storage and retrieval.

Parquet is a compressed columnar file format for storing intermediate analytical datasets. It preserves type information, so date columns remain typed when the data is read again. section 4.4.1

Use Parquet to separate data cleaning from analysis: export cleaned data once, then reload it without repeating potentially slow preparation steps. section 4.4.1

Export a cleaned dataset

After adding corrected categories, brands, and product names, write the intermediate dataset with pandas: events.to_parquet("./data/events.parquet.gz", compression="gzip"). section 4.4.1

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

november = pd.read_csv("./data/november.csv.gz")
december = pd.read_csv("./data/december.csv.gz")

events = pd.concat([november, december], axis=0, ignore_index=True)
print(events.shape)

Inspect the event data that can be cleaned and exported as an intermediate Parquet dataset. section 4.4.1

How The Well-Grounded Data Analyst covers it

How deep it goes
Defines compression and type preservation, then demonstrates export; it does not explain the internal file structure.
Examples
Exports cleaned event data to a gzip-compressed Parquet file after correcting product categories, brands, and names.
What you can do after
Operate Parquet through pandas to save cleaned analytical data and reload typed columns for later analysis.
How it connects
Connects compressed storage with data cleaning, data analysis, CSV comparison, date types, and intermediate datasets.

Also explained in

Compare how 9 books explain Parquet →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Well-Grounded Data Analyst. The section links point to the parts of the book it draws on.