Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

!pip3 install --user polars
Collecting polars
  Downloading polars-0.15.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.6/14.6 MB 38.2 MB/s eta 0:00:0000:0100:01
Installing collected packages: polars
Successfully installed polars-0.15.10
import polars as pl
df = pl.read_csv(
    "rank53_j0_j0.csv",
    has_header=False,
    dtypes={
        "column_1": pl.UInt8,
        "column_2": pl.UInt8,
        "column_3": pl.UInt8,
        "column_4": pl.UInt16,
        "column_5": pl.Utf8,
    },
    null_values=[],
)
df.columns = ["i0", "i1", "i2", "i", "ranks"]
df
Loading...
df["ranks"].is_null().sum()
1
(df["ranks"] == "NA").sum()
1
(df["ranks"] == "").sum()
0