I need to filter the df based on 2 criteria: where Name != jack and ignore all dates for jack where Date <= 2020-04-01
# List of Tuples
df = [ ('jack', 'Apples' , '2020-01-01') ,
('Riti', 'Mangos' , '2020-02-01') ,
('Aadi', 'Grapes' , '2020-03-01') ,
('jack', 'Oranges', '2020-04-01') ,
('Lucy', 'Mangos' , '2020-05-01') ,
('jack', 'Apples' , '2020-12-01')
]
#Create a DataFrame object
df1 = pd.DataFrame(df, columns = ['Name' , 'Product', 'Date'])
df1
Expected result being:
Name Product Date
0 Riti Mangos 2020-02-01
1 Aadi Grapes 2020-03-01
2 Lucy Mangos 2020-05-01
3 jack Apples 2020-12-01