Skip to content

Commit 6500ab1

Browse files
authored
Update rentsense_former_tenants_to_refined.py
1 parent d56986a commit 6500ab1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

scripts/jobs/rentsense_former_tenants_to_refined.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -982,19 +982,18 @@ def export_dynamic_frame_as_xml_gzip(
982982
)
983983

984984
w = Window.partitionBy("AccountReference").orderBy(F.col("TenancyEndDate").desc())
985-
985+
986986
accounts6 = (
987-
accounts5
988-
.withColumn("rn", F.row_number().over(w))
989-
.filter(F.col("rn") == 1)
987+
accounts5.withColumn("rn", F.row_number().over(w))
988+
.filter(F.col("rn") == 1)
990989
.selectExpr(
991990
"AccountReference",
992991
"TenancyEndDate",
993992
"LocalAuthority",
994993
"Patch",
995994
"'Hackney' as Region",
996-
"case when Deceased=1 then 'Y' else 'N' end as Deceased"
997-
)
995+
"case when Deceased=1 then 'Y' else 'N' end as Deceased",
996+
)
998997
)
999998
accounts7 = accounts6.filter("AccountReference is not null")
1000999

0 commit comments

Comments
 (0)