I am struggling to filter my dataframe, so that I have only rows with whole numbers (like 21.00). I saw one similar QA (Creating new column in pandas df populated by True,False depending on whether another column is a whole number), but it is not I want to achieve. I tried float.is_integer(), but this is not a method of Series and it would have to be applied element-wise with for loop.
In my dataframe I have a columns like this:
index value
0 43.00
1 23.47
2 5.31
3 349.00
and I want to extract only rows that contain whole numbers, so in the case above I want only rows with values: 43.00 and 349.00.
How can it be done without using for loops or adding the new column with indicator variable if the value is a whole number?
My dataframe has tens of millions of rows so I'd rather avoid using loops or adding another column if possible.