Skip to content

Instantly share code, notes, and snippets.

@juba
Last active October 24, 2024 09:18
Show Gist options
  • Save juba/35020376fa7eb9001090dcaa8754c77d to your computer and use it in GitHub Desktop.
Save juba/35020376fa7eb9001090dcaa8754c77d to your computer and use it in GitHub Desktop.
uv test
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "numpy",
# "polars",
# ]
# ///
import numpy as np
import polars as pl
df = pl.DataFrame(
{
"nrs": [1, 2, 3, None, 5],
"names": ["foo", "ham", "spam", "egg", None],
"random": np.random.rand(5),
"groups": ["A", "A", "B", "C", "B"],
}
)
print(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment