[Python] Undocumented pandas DataFrame shuffle()

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

  1. Stack

    Stack Membro Participativo

    The following seems to work:

    import pandas as pd
    import sklearn
    df = sklearn.datasets.load_iris()
    df = pd.DataFrame(df.data, columns=df.feature_names)
    df.shuffle()


    However this shuffle function seems not to be a documented DataFrame function?

    Is this an internal function we are not supposed to use?

    Continue reading...

Compartilhe esta Página