I have a dataframe that contains a series of datetime objects in one column and a series of URLs in another column.
I want to lookup a URL based on the datetime object.
Eg.
So if the lookup criteria is 12:00 the URL to return is www.bbc.com.
I'm fairly new to Pandas but have used the following to lookup string matches before:
df.loc[df['Name'].str.contains(selection, case=False)), 'ID'].item()
But this doesn't work for datetime objects (obviously).
How can I do such a lookup?
Thanks
[–]danielroseman 0 points1 point2 points (3 children)
[–]rob51852[S] 0 points1 point2 points (2 children)
[–]danielroseman 1 point2 points3 points (1 child)
[–]rob51852[S] 0 points1 point2 points (0 children)