Fmt
This commit is contained in:
parent
479ef92236
commit
c38d654ac7
44 changed files with 2526 additions and 701 deletions
|
|
@ -99,10 +99,14 @@ def convert_to_parquet(xls_path: Path, parquet_path: Path) -> None:
|
|||
combined = pl.concat(frames)
|
||||
|
||||
# Remap old LA codes to new unitary authority codes and average medians
|
||||
combined = combined.with_columns(
|
||||
pl.col("area_code").replace(LA_CONSOLIDATION),
|
||||
).group_by("area_code", "bedrooms").agg(
|
||||
pl.col("median_monthly_rent").mean(),
|
||||
combined = (
|
||||
combined.with_columns(
|
||||
pl.col("area_code").replace(LA_CONSOLIDATION),
|
||||
)
|
||||
.group_by("area_code", "bedrooms")
|
||||
.agg(
|
||||
pl.col("median_monthly_rent").mean(),
|
||||
)
|
||||
)
|
||||
|
||||
print(f"Combined: {combined.shape}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue