describe giving wrong format numbers

135 Views Asked by At

I have created a new calculated numeric column to my df. When I run describe function on this new column, I get all numbers with decimal placed in wrong place. For example, I get count as 2.04, when I know that df has 204 rows. When I run describe on the whole df, for all other variables I get count as 204, while for this one I get as 2.04. Is this because I dont have my variable in correct format? dtypes tells me it is a float64 type, which is what I expected. Could someone please help me understand and fix this?

1

There are 1 best solutions below

1
On

I figured it out. Because I was multiplying with a small number, the describe gave display as count 2.040000e+02, and I believe that means I need to shift decimal to right by two numbers. I am posting so that maybe it will help someone else