I have this DataFrame:
pd.DataFrame({
'as_of': pd.date_range('2020-01-01', '2020-01-05', freq='D'),
'x': [np.array([str(np.random.random()) for _ in range(2)]) for _ in range(5)]
})
Imagine that this DataFrame with 50k rows and the numpy array size is variable, no more than 5 values though.
How can I filter the DataFrame to give me just the row that matches the value that is inside of the numpy array, in the most efficient manner?
Also, instead of a single value, how can I filter for the entire numpy array?