Skip to content
Advertisement

Get only data that are repeated any one of the given year in pandas

Below is the Raw Data. I want only those event which will repeat in given set of list of years. Eg [2012,2013]. So now it should only get data if event is repeated in one of the given year in the list.

JavaScript

I want below output.

JavaScript

Advertisement

Answer

You can try groupby and filter

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement