I have a df with a column that I want to filter for only negative or only positve values,
when I try code below as:
df.loc[df['values'] > 0]
I get error of
`TypeError: '>' not supported between instances of 'str' and 'int'
I try to convert the object data type of the values column to integer:
df['values'].astype(str).astype(int)
I get error of : ValueError: invalid literal for int() with base 10: '3.69'
Thanks!
How Can I convert correctly so I can then filter correctly? Thanks!