How to do a pandas query when the datatype is object? I tried:
df.query('Train.Test=="Test"')
And also
df.query('Train.Test==Test')
without success.
SampleID,Age,Ctrl.Case,Train.Test,Subject.ID
2241944,22,Ctrl,Train,1
2119485,22,Ctrl,Test,2
2312486,21,Ctrl,Test,5
2813487,19,Ctrl,Test,6
2812488,21,Ctrl,Test,7
Should I convert it to string first? or can I still query with Train.Test
as object type?