[Python] pandas: difference between df.pop('x') and df.drop('x', axis=1,inplace=True) and del...

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

  1. Stack

    Stack Membro Participativo

    Do they have the same exact effect (other than the fact that only one returns the popped column)? If so, is there ever a reason to use df.drop('x', axis=1,inplace=True) or del df['x']over the more concise df.pop('x')?

    Continue reading...

Compartilhe esta Página