Filter out 0 room properties
This commit is contained in:
parent
1caa9fe5ff
commit
77e01776f5
1 changed files with 6 additions and 0 deletions
|
|
@ -36,6 +36,12 @@ def main():
|
|||
"CONSTRUCTION_AGE_BAND",
|
||||
)
|
||||
.filter(pl.col("epc_address").is_not_null())
|
||||
.with_columns(
|
||||
pl.when(pl.col("NUMBER_HABITABLE_ROOMS") == 0)
|
||||
.then(None)
|
||||
.otherwise(pl.col("NUMBER_HABITABLE_ROOMS"))
|
||||
.alias("NUMBER_HABITABLE_ROOMS"),
|
||||
)
|
||||
.sort("INSPECTION_DATE", descending=True)
|
||||
.group_by("epc_address", "POSTCODE")
|
||||
.first()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue