python filter dataframe for all records with year = '2016' code example Example: padas df filter rows by date df['20160101':'20160301']