I am trying to understand why 5 in df['ids'] in code below return True since number 5 doesn't exist in the pandas dataframe.
In [82]: df = pd.DataFrame()
In [83]: df['ids'] = list(range(5)) + list(range(6,10))
In [84]: df
Out[84]: 
   ids
0    0
1    1
2    2
3    3
4    4
5    6
6    7
7    8
8    9
In [85]: 5 in df['ids']
Out[85]: True
In [86]: df[df['ids'] == 5]
Out[86]: 
Empty DataFrame
Columns: [ids]
Index: []
In [87]: 5 in list(df['ids'])
Out[87]: False
 
    