Drop columns in pandas or drop rows in pandas (using drop function in python) | Neeraj Sharma

preview_player
Показать описание
Using the drop() function of python pandas you can drop or remove :

- Specific row or column
- multiple rows or columns
from the dataframe
Syntax:

drop()
drop(labels=[1,5])
drop([1,5])

how to drop column

you can do the same work with parmeter index and columns

remember : you Cannot specify both 'labels' and 'index'/'columns'

you can remove rows and collumns together
using

if you want to ignore error and want to drop or delete only existing labels are dropped.
level
df

Рекомендации по теме
Комментарии
Автор

❤ wow great explanation for the starter like me. God bless you

asifnaive
Автор

Very understandable and informative! Thank you very much.

BlissOn
Автор

Very good explanation and presentation, better than any ivy league lectures

rashmiguduru
Автор

Thanks Mr. Sharma. I had doubt "inplace = True". I google it but as usual there were too much long text. And my reliable hope in explanation from an Indian guy. As always they are good at easy explanation and talk at exact point.

mohiuddinshojib
Автор

Good explication my friend, thanks you

EDXELJOGUESMATOSFERNANDEZ
Автор

Fantastic and in detail explanation of drop function

ashwinjaipurkar
Автор

Thank you so much .
Very helpful.
This video is very helpful for me to solve keyerror.

Islamic_videos
Автор

awesome explanation! thank you so much

kushagra
Автор

how to drop a range of columns along with a single column together using drop function, example [ col_1 : col_5, col_9 ] from a dataframe ?

subhrajitroychowdhury
Автор

how to drop rows that satisfies some condition?

kushagra
Автор

all the details is covered for drop function

shubhamvijayvargiya
welcome to shbcf.ru