Skip to content

QST: Pandas describe() methods(with float16 and float32) are different #41277

@Leejung8763

Description

@Leejung8763
  • I have searched the [pandas] tag on StackOverflow for similar questions.

  • I have asked my usage related question on StackOverflow.


Question about pandas

I'm trying to optimise my df dtypes to consume less memory.
I noticed differences in the describe() method output on that df.
Why those outputs are different?

Note: If you'd still like to submit a question, please read this guide detailing how to provide the necessary information for us to reproduce your question.

# Your code here, if applicable
df = pd.DataFrame({'a':[11111,22222,3333]})
df['a'].describe()
df['a'].astype('float16').describe()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions