Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 04:54 AM
AttributeError: 'DataFrame' object has no attribute 'ColumnChecker'
def func_udf(df,col):
column =list(df.columns)
if col in column:
return df.col
else:
df.withColumn("col", lit(null))
spark.udf.register("ColumnChecker",func_udf)
dfg=a.ColumnChecker(a,ref_date)
dfg.show()
this is the code i am running