Not able to perform operations on resulting dataframe after "join" operation in PySpark

df=spark.read.csv(‘data.csv’,header=True,inferSchema=True) rule_df=spark.read.csv(‘job_rules.csv’,header=True) query_df=spark.read.csv(‘rules.csv’,header=True) join_df=rule_df.join(query_df,rule_df.Rule==query_df.Rule,"inner").drop(rule_df.Rule).show() print(join_df.collect().columns) Here I have created three dataframes: df,rule_df and query_df. I’ve performed inner join on rule_df and query_df, and stored the resulting dataframe in join_df. However, when I try to simply print the columns of the join_df dataframe, I get the following error- AttributeError: ‘NoneType’ object has no attribute ‘columns’ The… Read More Not able to perform operations on resulting dataframe after "join" operation in PySpark