diff --git a/.gitignore b/.gitignore index 92f9633..d69c82d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,6 @@ /.python-version /uv.lock -/.venv \ No newline at end of file +/.venv + +*.pyc \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 028783c..6560f86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,4 +6,5 @@ readme = "README.md" requires-python = ">=3.12" dependencies = [ "orjson>=3.11.1", + "polars>=1.32.0", ] diff --git a/utils/export_regions.py b/utils/export_regions.py new file mode 100644 index 0000000..13cf8ab --- /dev/null +++ b/utils/export_regions.py @@ -0,0 +1,7 @@ +import polars as pl + +from hasher import salted_hash_userid + +pl.scan_parquet("regions.parquet").with_columns( + pl.col("user_id").map_elements(salted_hash_userid, return_dtype=pl.String) +).collect().write_parquet("regions_pub.parquet")