I've read a Pandas dataframe from file:
df = pd.read_csv('data_here.csv')
When I try "str2try" in df['col2search']
it returns False
, but when I try "str2try" in df['col2search'].values
, it returns True
(and this is what I'd expect in this case).
I don't see why there would be a behavioral difference; I read that .values
returns the Numpy representation of the column, but why does "str2try" in <NDFrame representation of column>
return False
?
Thanks!