I know it might be old debate, but out of pandas.drop
and python del
function which is better in terms of performance over large dataset?
I am
Summarizing a few points about functionality:
drop
operates on both columns and rows; del
operates on column only. drop
can operate on multiple items at a time; del
operates only on one at a time. drop
can operate in-place or return a copy; del
is an in-place operation only. The documentation at https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop.html has more details on drop
's features.