Skip to content

Summary stats display as all None for MultiIndex row DataFrames #649

@paddymul

Description

@paddymul

Description

When displaying a DataFrame with a MultiIndex on rows (e.g. from .groupby() without .reset_index()), the summary stats rows show None for every cell instead of the actual computed statistics (dtype, length, mean, etc.).

The data columns render correctly, but the summary stats pinned rows are entirely None.

Reproduction

import pandas as pd
from buckaroo import BuckarooWidget

row_index = pd.MultiIndex.from_tuples([
    ('foo', 'a'), ('foo', 'b'),
    ('bar', 'a'), ('bar', 'b'), ('bar', 'c'),
    ('baz', 'a')])

df = pd.DataFrame({
    'foo_col': [10, 20, 30, 40, 50, 60],
    'bar_col': ['foo', 'bar', 'baz', 'quux', 'boff', None]},
    index=row_index)

BuckarooWidget(df)

Expected

Summary stats rows should show dtype, mean, min, max, histogram, etc. for foo_col and bar_col.

Actual

All summary stats rows display None for every column.

Screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions