Pandas: What are the cases when count returned by DataFrame describe is a floating point

Question:

When describing my Pandas dataframe: I get the following result:

           Mains_1_Power  Mains_2_Power
count      17.000000      17.000000
mean       57.063528     200.428607
std        67.605151      69.364919
min        11.015203     135.492259
25%        31.850638     161.546607
50%        35.871114     183.986024
75%        56.419915     210.772911
max       312.787603     446.077603

I do not understand the cases where count should be a float, do we have half records?
If the count is always an integer, is it just the representation, which is floating point?
It can be confusing to put up results where count is not an integer. Is there a workaround?

Asked By: Nipun Batra

||

Answers:

Count will always be an integer with type float64 (rather than type int).

This is purely for presentation, because DataFrames columns must have the same type (or, at least, there are performance gains in them doing so over object type).

Answered By: Andy Hayden
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.