While discovering python, i found myself stuck trying to select rows (food items) based on values of a column (macro nutriments). My condition uses a relational operation and the output is not the correct. 
(particularly with the > or < operators not having the problem with the == operator). 

```
data.loc[data['protein']=='10']

```

Result of my code sample

[![enter image description here](https://i.stack.imgur.com/wVwJ1.png)](https://i.stack.imgur.com/wVwJ1.png)

The result is correct because all the rows (food items) seem to have a protein of value 10.

```
data.loc[data['protein']>'10']

```

Result of my code sample

[![enter image description here](https://i.stack.imgur.com/y7eXW.png)](https://i.stack.imgur.com/y7eXW.png)

The result is incorrect because all the rows have a value that do not respect the condition given (you have rows with protein < 10 like you have rows with protein >10) .

```
data.loc[data['protein']>'10']

```

Any thoughts on the issue ? Do you think it's related with the file format (see code sample below) ? If so, how can i get around the problem ? 

```
data = pd.read_excel('Documents/test.xlsx',names=col_names,usecols="D,E,F,G,H,J,M,N,P,Q,R,T,Y,Z,AA", index_col =[3]).

```

Thanks in advance and Happy Holidays !!

[EDITED]

**So did more digging, indeed i am comparing two different things. @Daniel Mesejo the type of protein is Object. Since i want to have the protein column in a float format, i decided to convert it into string first and then into float. Unfortunately converting it to string using the `.astype(str)` didn't work** 

[result](https://i.stack.imgur.com/zuDVf.png)