Resolved! unable to replace null with 0 in dataframe using Pyspark databricks notebook (community edition)
Hello Experts,I am unable to replace nulls with 0 in a dataframe ,please refer to the screen shotfrom pyspark.sql.functions import col emp_csv_df = emp_csv_df.na.fill(0).withColumn("Total_Sal",col('sal')+col('comm')) display(emp_csv_df)erorr desired ...
- 3939 Views
- 1 replies
- 2 kudos
Latest Reply
I bet that it is not real null but the string "null". Please check what is in the source and try luck with replacing it.
- 2 kudos