Why can't i filter a column by a float like i would an integer in python?

Question:

For example:

df[df['nums']==23].head() #gives what its supposed to, but 
df[df['nums']==35.0454545455].head() #gives a blank df and that value exists in the column.

Answers:

The float value is more specific than the filter you are providing.

You could round your float value and compare or >= some value would work. A precise float unless precise to the last decimal will not work.

Answered By: jason m
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.