Home
Chat
This website collects cookies to deliver better user experience
OK
8 Tips & Tricks for Pandas
8 Tips & Tricks for Pandas
1. Use pandas >= 1.0.0
Performance boosts above this version, so upgrade your package asap
2. Specify the types of the columns when loading csv
Save a lot of memory in large files
3. Specify the necessary columns when loading
Do not load columns you don't need
4. Delete Dataframes you not longer need
Free memory when possible
5. Read a file and process per chunks
Useful for large files
6. Explicitly convert certain columns to datetime objects when loading
This helps you to do easy transformations on datetimes columns
7. Use multi-index when possible
Groups values and compress data, saving a lot of memory
8. Avoid Apply method, use built in functions
Save CPU processing time avoiding Apply()
20
0
Categories:
Python
Tags:
Python
Tutorial
Performance
Datascience
Related Posts
loading...
loading...
loading...
loading...
loading...
loading...
loading...
loading...
Post Comment
Show Comments
Websites To Learn Programming For Free
C# For Beginners - Lesson 6: Strings
NodeJS vs Python
App Development Practices To Follow For Your Business In 2021
A first look at Qwik - the HTML first framework
Laravel Fluent Str - 48 Methods [🚀 10 MINUTES!]
How to Safely Render Markdown From a React Component
Your Essential Guide To Map Built-in Object In Javascript