Skip to content

Commit 022aa8b

Browse files
authored
Merge pull request #305 from The-Strategy-Unit/59_sushrg-trimmed-apc
add sushrg_trimmed to apc data
2 parents 97ada8c + f6b85ce commit 022aa8b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

notebooks/extract_data_from_databricks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
.withColumn("tretspef_raw", F.col("tretspef"))
3737
.withColumn("fyear", F.floor(F.col("fyear") / 100))
3838
.withColumn("sex", F.col("sex").cast("int"))
39+
.withColumn("sushrg_trimmed", F.expr("substring(sushrg, 1, 4)"))
3940
)
4041

4142
# COMMAND ----------

0 commit comments

Comments
 (0)