Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Write Pandas Objects Directly to Compressed Formats

Since Pandas version 0.21.0 you can save your DataFrames in a compressed format to save space. Have a look at this short and sweet recipe to save a DataFrame in a compressed format using gzip:

abalone.to_json('df.json.gz', orient='records',
                lines=True, compression='gzip')

Watch the video to learn more about it.

Comments & Discussion

andrewcheryl on April 12, 2019

Awesome course - full of really useful tips. Thankyou !

Joe Tatusko RP Team on April 15, 2019

Glad you enjoyed it! Feel free to reach out if you have any questions :D

senatoduro8 on July 17, 2019

I love the clipboard trick. It’s my favorite so far and it allow me to copy data from the “supporting material” page and get working with without having to save it first as file because it’s a throw away file anyway.

Thanks for the tutorial

Joe Tatusko RP Team on July 18, 2019

Yeah! Such a neat little feature that goes mostly unnoticed. Glad it could help speed up your workflow!

Become a Member to join the conversation.