I am trying to check if a dataframe is empty in Pyspark using below.
print(df.head(1).isEmpty)
But, I am getting an error
Attribute error: 'list' object has no attribute 'isEmpty'.
I checked if my object is really a dd using type(df) and it is class 'pyspark.sql.dataframe.Dataframe'