df = sqlContext.createDataFrame([(1, '14-Jul-15 11.34.29.000000 AM'), (2,
    '14-Jul-15 11.34.27.000000 AM'), (3, '14-Jul-15 11.32.11.000000 AM'), (
    4, '14-Jul-15 11.29.00.000000 AM'), (5, '14-Jul-15 11.28.29.000000 AM')
    ], ('id', 'datetime'))
now = datetime(2015, 7, 14, 11, 35)
df.where(in_last_5_minutes(now)(col('datetime'))).show()
Фильтрация столбцов в PySpark