I posted a similar question last week but have come to the conclusion that it's not a problem with the code as such but a loss of data and I was wondering if anyone knows a fix or has experienced similar problems. I have tried saving the document as csv, xlsx and xls to see if this would resolve it but no change.
So my excel file is just a straight forward fairly small table with "Yes" and "No" values.
I know the code works because when I input this:
df.loc[(df["Unnamed: 18"] == "Yes")]
I get the desired output of:

(If you cannot see the photo its returned the rows that were True)
However when I enter
df.loc[(df["Unnamed: 17"] == "Yes")]

(it returns no data if you cannot access the photo)
I get the same if I switch it to == "No".
It just does not want to read data from that column. I get sent several of these spreadsheets a day and its always the same columns that it won't read. Any advice or help would be greatly appreciated.