Estimating DataFrame size
Now check how much memory you saved. The numeric downcasts from the previous exercise have already been applied for you in movies_optimized. The original size is printed so you can compare it against the optimized one.
This exercise is part of the course
Scaling and Optimizing Data Pipelines with Polars
Exercise instructions
- Use the right method on
movies_optimizedto estimate its size in megabytes.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Get the optimized size
after_size_mb = movies_optimized.____("____")
print(after_size_mb)