diff --git a/my_lib/my_funcs.py b/my_lib/my_funcs.py index f1742f4..3e1cdeb 100644 --- a/my_lib/my_funcs.py +++ b/my_lib/my_funcs.py @@ -1,3 +1,4 @@ +# Databricks notebook source def convertFtoC(unitCol, tempCol): from pyspark.sql.functions import when, col return when(col(unitCol) == "F", (col(tempCol) - 32) * (5/9)).otherwise(col(tempCol)).alias("temp_celcius") diff --git a/temperatures.py b/temperatures.py index b5b8778..b42d87f 100644 --- a/temperatures.py +++ b/temperatures.py @@ -52,3 +52,11 @@ # COMMAND ---------- display(df.select(convertFtoC("unit", "temp"))) + +# COMMAND ---------- + +# MAGIC %md ###adding this cell simply to follow instructions and commit a change to the code + +# COMMAND ---------- + +df.count()