A stackoverflow user submitted a problem that they were having using PySpark to convert a timestamp column to a date and then use that column in a groupBy().Here's their code and the error received, df = spark.sql("SELECT * FROM myTable") df.filter((df.somthing != "thing")) df.withColumn("MyDate", col("Timestamp").cast("date")) df.groupBy("MyDate").count().show() ERROR  cannot resolve 'MyDate' given...