Need more info,
what is the version of Spark used.
Argument col
. What is this col and where its used. Please share that code.
Try debugging by finding the dataframe variable type. type(df1) or type(df) - which will produce output whether is string class or column class.