I'm doing a somewhat complex lookup of dates in multiple tables. I've run into this error a bunch and have previously found what was wrong and fixed it.
Here, I'm puzzled. I like to oversimplify the issue so I can figure it out. The following has me scratching my head:
print ('04/01/2009' in trouble_df['Date'])
>False
OK, so the index isn't in the list I'm looking at. So I pulled up this list, and found the value '04/01/2009', along with its index. So I tried:
print (trouble_df['Date'][157])
>04/01/2009
Maybe the date is the wrong datatype.
print (type(trouble_df['Date'][157]))
> <class 'str'>
Nope. OK, how is this possible:
print (trouble_df['Date'][157] in trouble_df['Date'])
>False
Please help!