Skip to content

Commit

Permalink
Update pandas.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay authored Nov 19, 2023
1 parent d462177 commit e0ad696
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/python/pandas.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ df = pd.read_csv(

## Load and Save as Parquet

- save to parquet: `df.to_parquet("<file_name>.parquet.gz", compression="gzip", index=False)`
- load from parquet: `df = read_parquet("<file_name>.parquet.gz")`
- save to parquet: `df.to_parquet("file_name.parquet.gz", compression="gzip", index=False)`
- load from parquet: `df = read_parquet("file_name.parquet.gz")`

## Load and Save with Pickle

- save to parquet: `df.to_pickle("<file_name>.pkl.xz", compression="xz")`
- load from parquet: `df = read_pickle("<file_name>.pkl.xz")`
- save to parquet: `df.to_pickle("file_name.pkl.xz", compression="xz")`
- load from parquet: `df = read_pickle("file_name.pkl.xz")`
- see <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_pickle.html>
- see <https://pandas.pydata.org/docs/reference/api/pandas.read_pickle.html>

Expand Down

0 comments on commit e0ad696

Please sign in to comment.