[Python] Split a large pandas dataframe

Discussão em 'Python' iniciado por Stack, Agosto 18, 2025.

  1. Stack

    Stack Membro Participativo

    I have a large dataframe with 423244 lines. I want to split this in to 4. I tried the following code which gave an error? ValueError: array split does not result in an equal division

    for item in np.split(df, 4):
    print item


    How to split this dataframe in to 4 groups?

    Continue reading...

Compartilhe esta Página