[Python] How iloc pandas slicing works [duplicate]

Discussão em 'Python' iniciado por Stack, Março 26, 2025.

  1. Stack

    Stack Membro Participativo

    What is the meaning of below line. I'm especially confused about how [:,0:6] is working?

    X = pd.get_dummies(df.iloc[:,0:6])


    Above code is transforming categorical data into a format that can be provided to machine learning algorithms.

    Continue reading...

Compartilhe esta Página