filter datetime64 type based on year to string pandas code example Example: padas df filter rows by date df['20160101':'20160301']