.
This commit is contained in:
parent
909e241907
commit
1ee796b282
29 changed files with 250 additions and 126 deletions
|
|
@ -35,7 +35,7 @@ def _data_rows(df: pl.DataFrame) -> pl.DataFrame:
|
|||
|
||||
The preamble length varies (title, optional "This worksheet contains..."
|
||||
note, then the header row starting with "Time period"), so locate the
|
||||
header by content instead of counting rows — a fixed slice leaves the
|
||||
header by content instead of counting rows: a fixed slice leaves the
|
||||
header in the data whenever ONS adds or removes a note line.
|
||||
"""
|
||||
header_marker = (
|
||||
|
|
@ -78,7 +78,7 @@ def _latest_rents_long(df: pl.DataFrame) -> pl.DataFrame:
|
|||
print(f"LAs in latest month: {df.height}")
|
||||
|
||||
# Melt to long format: one row per area x bedroom count.
|
||||
# PIPR has no Studio category — one-bed rent used as proxy for bedrooms=0.
|
||||
# PIPR has no Studio category: one-bed rent used as proxy for bedrooms=0.
|
||||
frames = []
|
||||
for col, bedrooms in [
|
||||
("rent_1bed", 0), # Studio (proxy)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue