good stuff
This commit is contained in:
parent
ea8389ef40
commit
f4de0eeb9f
39 changed files with 5165 additions and 348 deletions
|
|
@ -92,5 +92,14 @@ def write_parquet(properties: list[dict], path: Path, channel: str) -> None:
|
|||
},
|
||||
)
|
||||
|
||||
# Derive asking price per sqm for buy listings
|
||||
if channel == "buy":
|
||||
df = df.with_columns(
|
||||
(pl.col("Asking price") / pl.col("Total floor area (sqm)"))
|
||||
.round(0)
|
||||
.cast(pl.Int32, strict=False)
|
||||
.alias("Asking price per sqm"),
|
||||
)
|
||||
|
||||
df.write_parquet(path)
|
||||
log.info("Wrote %d properties to %s", len(df), path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue