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

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Write Pandas Objects Directly to Compressed Formats

Give Feedback

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.

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!

Pygator on Nov. 28, 2019

Finally finished, I had forgotten about this course, but more videos from you on Core Pandas datastructures would be nice. Great tips. Also, you sound like the lead actor in Boyhood; I recently watched that movie.

Pakorn on Dec. 18, 2019

Great tips, Thanks!

Fahim on Aug. 14, 2020

At last completed it. Great content.

Become a Member to join the conversation.