Skip to content

Statistical Information is not Displayed on Type Casting #2

@ZenithClown

Description

@ZenithClown

Overview

A type casting function is developed (based on this link) to reduce the memory usage of a dataframe. However, using the function the statistical information is missing when using pd.describe() feature.

Steps to Reproduce

  1. Use the pd.describe() method w/o any modifications, results in:
    image
  2. Now, define/import reduce_mem_usage
  3. Using the same function, the output is changed as:
    image

Expected Behavior

Should be able to use all statistical features.

Actual Behavior

Direct describe function is not working, but using native numpy functions (like np.quantile(trn_data["f_00"], 0.95)) works.

Context

Python Version : 3.9
Operating System : Windows 10 (Version: 21H2, OS Build: 19044.1682)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions