According to spark documentation "where() is an alias for filter()"
Using filter(condition) you can filter the rows based on the given condition and where() is an alias for filter().
Parameters: condition – a Column of types.BooleanType or a string of SQL expression.
>>> df.filter(df.age > 4).collect()
[Row(age=6, name=u'Amit')]
>>> df.where(df.age == 3).collect()
[Row(age=3, name=u'Prateek')]
>>> df.filter("age > 4").collect()
[Row(age=6, name=u'Amit')]
>>> df.where("age == 2").collect()
[Row(age=2, name=u'Prateek')]