Sometimes the Python Polars library upgrades.
The following are some codebase migrations I've used.
- Find+Replace:
pl.Utf8 -> pl.String
pip install micropython-rp2-rpi_pico-stubs
to install Python type checking helpers.Main guide: https://etoast.net/posts/agilent_repair/
Repairing the power supply is not very feasible.
import numpy as np | |
import pandas as pd | |
import polars as pl | |
import time | |
from memory_profiler import memory_usage | |
# Array shapes to test | |
shapes = [ | |
(10_000, 10), | |
(10_000, 200), |
""" | |
Related to https://github.com/pydata/xarray/issues/10135 | |
Result (in VS Code debugger): | |
Shape | NumPy → Polars | NumPy → Pandas → Polars | |
----------------------------------------------------------------- | |
10,000 x 10 | 0.003997 s | 0.033097 s | |
10,000 x 200 | 0.002424 s | 0.050915 s | |
100,000 x 10 | 0.000278 s | 0.021541 s |