How do I remove columns from a pandas DataFrame?

preview_player
Показать описание
If you have DataFrame columns that you're never going to use, you may want to remove them entirely in order to focus on the columns that you do use. In this video, I'll show you how to remove columns (and rows), and will briefly explain the meaning of the "axis" and "inplace" parameters.

SUBSCRIBE to learn data science with Python:

JOIN the "Data School Insiders" community and receive exclusive rewards:

== RESOURCES ==

== LET'S CONNECT! ==
Рекомендации по теме
Комментарии
Автор

Amazing Teacher!
Every tutorial has something that i would do lots of searching to find it out!
Thank you Kevin!

erfannazari
Автор

You youtube always clear and with structures. This is is handy. Waiting you to have more videos - like data Wrangling + Modeling.

amandal
Автор

This is the first video that I watch from u and 100% sure won't be the last. THANK U

solme
Автор

Such a nice explanation. I think one of the best explanations on Youtube so far. Nice Job!

andrenevares
Автор

Thank you for all your efforts. Your videos are really organized and the material is thoroughly explained. It's very noble of you.

revolutionN
Автор

Very well explained! The Data analysis in Python series is so useful!!!

sarikakazi
Автор

Sir, just excellent, we want your videos on pandas on more difficult topics

afrozaaktermousumi
Автор

Thanks for posting the videos. Very easy to understand.Keep up the good work

myravat
Автор

thanks a lot for this wonderful short video! very helpful!

kennyl
Автор

Your classes are awesome! Thank you very much. It is veery useful.

robertorolo
Автор

I am very glad that you made these videos! Thank you!

Nurlan_Turganov
Автор

Sir Kevin Markham, this is indeed very helpful

rogersteven
Автор

Love your videos! QUESTION: Do you have a video that explains when it's a good idea to drop certain columns? For example, how do we determine if a column should be dropped before using it as a feature to predict a target in machine learning problems? Which columns are worth keeping and which ones are "noisy" or unhelpful? Thanks so much for all you do in the world of teaching!

goldensleeves
Автор

you are the best explaining python!!!!

dianavallejo
Автор

hey i got to know that we can also use :
del(ufo['City'])
for example, to remove city column.
this will work to delete a single column only.

sherlockom
Автор

Thanks buddy for this very clear video.

VishalSharma-rnmt
Автор

we can use also
ufo.drop(list(range(1, 5)), axis=0, inplace=True) to drop more rows

mohnasnassr
Автор

I didn't quite understand what 'inplace=True' means from this video. But thanks anyways! I like this series a lot and will keep watching it.

anisity-nq
Автор

thanks, when I study with this vedio I feel the time is slowly

nzsdkbm
Автор

Good stuff! I do have a question, but I'm sure I can find the answer...it does seem to be a difficult one to hunt up though. I am importing data for use in training deep learning trading strategies, and the timestamp is in unix. I am having difficulty converting those into datetime. I am sure by the time you respond, if you do...I will have solved it, but it might make for a helpful tutorial, since I have seen I am not the only one with this difficulty. But, I would also like to say that this is an excellent series of tutorials. Very well done. You are a good instructor. Thanks for the great lessons! +

goodmorninghumans