Pyspark Importing Column module to use gt or geq

Viewed 2298

I am following this solution with Spark 2.0.0 Filtering a spark dataframe based on date

Without the Column module, I get the following error when I try to use expression gt.

DataFrame' object has no attribute 'gt'

I tried to import Column module to use expressions like lt,gt, geq etc.

from pyspark.sql.column import *

I get the error:

AttributeError: 'module' object has no attribute 'DataFrame'

Any tips on how can I use gt expression?

1 Answers
Related