Can anyone explain to me why I am getting different results for these 2 expressions ? I am trying to filter between 2 dates:
df.filter(\"act_date <=\'2017
In first case
df.filter("act_date <='2017-04-01'" and "act_date >='2016-10-01'")\
.select("col1","col2").distinct().count()
the result is values more than 2016-10-01 that means all the values above 2017-04-01 also.
Whereas in second case
df.filter("act_date <='2017-04-01'").filter("act_date >='2016-10-01'")\
.select("col1","col2").distinct().count()
the result is the values between 2016-10-01 to 2017-04-01.