[Python] Convert DataFrameGroupBy object to DataFrame pandas

Discussão em 'Python' iniciado por Stack, Junho 11, 2025.

  1. Stack

    Stack Membro Participativo

    I had a dataframe and did a groupby in FIPS and summed the groups that worked fine.

    kl = ks.groupby('FIPS')

    kl.aggregate(np.sum)


    I just want a normal Dataframe back but I have a pandas.core.groupby.DataFrameGroupBy object.

    Continue reading...

Compartilhe esta Página