From 99ed146863ab21bac6dc3f45c14a9fb584565acd Mon Sep 17 00:00:00 2001 From: ttosunbayraktar <90699309+ttosunbayraktar@users.noreply.github.com> Date: Thu, 16 Sep 2021 14:50:04 +0200 Subject: [PATCH 1/2] Update my_funcs.py --- my_lib/my_funcs.py | 1 + 1 file changed, 1 insertion(+) 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") From c0bc6417badf8c9ff5b91a909b2116c19f1a0bf0 Mon Sep 17 00:00:00 2001 From: ttosunbayraktar Date: Thu, 16 Sep 2021 12:57:15 +0000 Subject: [PATCH 2/2] Test commit. --- temperatures.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/temperatures.py b/temperatures.py index b5b8778..8977c71 100644 --- a/temperatures.py +++ b/temperatures.py @@ -52,3 +52,16 @@ # COMMAND ---------- display(df.select(convertFtoC("unit", "temp"))) + +# COMMAND ---------- + +# MAGIC %md +# MAGIC This is a new markdown cell. + +# COMMAND ---------- + +df.count() + +# COMMAND ---------- + +