Headache time.
I have a dataframe where an important column is of the type 'datetime64[ns]'. There are >1500000 rows, the datetime column contains about 3000 unique 'start times' (runs of a piece of equipment).
After performing some groupby
s and data analysis I have ID'd ~ 30 runs of interest (identifiable by their run/start_time).analysis_df.start_time.unique()
creates a numpy array of these datetimes.
I would like to use to pull out the raw data for these ~30 runs, and was hoping to use isin
a la
Filter dataframe rows if value in column is in a set list of values, however I have fallen foul of ISIN function does not work for dates and I'm a bit stuck.
I've looked into converting formats: Converting between datetime, Timestamp and datetime64 but the fact that Wes refers to this aspect as 'Hell' is doesn't fill me with hope! https://stackoverflow.com/a/13753918/2658194
Any help on how to achieve this 'filter' would be greatly appreciated - if anyone has a different (better!) approach i'd be happy to change up.
Thanks