feat: export regions
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -12,3 +12,5 @@
|
|||||||
/uv.lock
|
/uv.lock
|
||||||
|
|
||||||
/.venv
|
/.venv
|
||||||
|
|
||||||
|
*.pyc
|
||||||
@@ -6,4 +6,5 @@ readme = "README.md"
|
|||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"orjson>=3.11.1",
|
"orjson>=3.11.1",
|
||||||
|
"polars>=1.32.0",
|
||||||
]
|
]
|
||||||
|
|||||||
7
utils/export_regions.py
Normal file
7
utils/export_regions.py
Normal file
@@ -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")
|
||||||
Reference in New Issue
Block a user