Тёмный

Handling Missing Values in Pandas Dataframe | GeeksforGeeks 

GeeksforGeeks
Подписаться 709 тыс.
Просмотров 123 тыс.
50% 1

In this video, we're going to discuss how to handle missing values in Pandas. In Pandas DataFrame sometimes many datasets simply arrive with missing data, either because it exists and was not collected or it never existed. And as we can't provide null values to our Machine Learning model, we need to handle them properly. Now, let's get started.
00:00 Let's Start
01:44 Checking for Missing Values using isnull()
03:31 Filling Null Values Using fillna()
05:35 Filling Null Values Using fillna(method = 'pad')
07:05 Filling Null Values Using fillna(method = 'bfill')
11:41 Filling Null Values with the Mean, Max or Min of a Column
13:38 Dropping Null Values Using dropna()
16:12 Filling Null Values Using replace()
18:47 Filling Null Values Using interpolate()
21:50 Closing Notes
Download Dataset From [www.kaggle.com/amitabhajoy/be...]
Check Out the Related Article:
Working with Missing Data in Pandas [www.geeksforgeeks.org/working...]
Complete Pandas Tutorial [www.geeksforgeeks.org/pandas-...]
WISH TO CONTRIBUTE VIDEOS ON GEEKSFORGEEKS? Please submit this Google Form - docs.google.com/forms/d/e/1FA...
Our courses: practice.geeksforgeeks.org/co...
This video is contributed by Akshit Madan.
Please Like, Comment, and Share the Video among your friends.
#python​​ #pandas​​ #dataframe​​ #datascience​​ #pythonpandas​​ #eda​​
Install our Android App:
play.google.com/store/apps/de...
If you wish, translate into the local language and help us reach millions of other geeks:
ru-vid.com_cs_p...
Follow us on our Social Media Handles -
Twitter- / geeksforgeeks
LinkedIn- / geeksforgeeks
Facebook- / geeksforgeeks.org
Instagram- geeks_for_g...
Reddit- / geeksforgeeks
Telegram- t.me/s/geeksforgeeks_official
Also, Subscribe if you haven't already! :)

Опубликовано:

 

3 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 73   
@GeeksforGeeksVideos
@GeeksforGeeksVideos 3 года назад
WISH TO CONTRIBUTE VIDEOS ON GEEKSFORGEEKS? Please submit this Google Form - docs.google.com/forms/d/e/1FAIpQLScSVFlE-stz69M_l46xcwZlVRzDxT_91dlc-px5ytr7QHYmkQ/viewform
@KeerthivasanSundararaman
@KeerthivasanSundararaman Год назад
got a solution after about 30 mins of search.. Thank you made my day..
@mrtbhdr
@mrtbhdr 2 года назад
geeksforgeeks never disappoints, thanks for this!
@senglay5729
@senglay5729 2 года назад
Clear explanation and easy to understand. Thank you!
@darksector1389
@darksector1389 Год назад
You, sir, are amazing and a savior to my project 🙏
@sougatamitra5112
@sougatamitra5112 Год назад
One of the best explanations!! kudos
@MrKbforex
@MrKbforex 2 года назад
Great content..Exactly what I have been looking for... Thanks
@CuriousLearner_05
@CuriousLearner_05 9 месяцев назад
Thanks for the clarification , helped in clear a problem I was stuck in
@-DanishShafi
@-DanishShafi 6 месяцев назад
Thanks brother. The video was amazing, it cleared all my doubts. Rise and shine🎉
@raumitraj8628
@raumitraj8628 2 года назад
Bhut acha conceptual content hai yrr. It's really awesome!!!
@Gouthami-xr4eh
@Gouthami-xr4eh Месяц назад
Thank you .very nice and clear explanation .Easy for everyone to understand.thank you sir .
@mariamartin6205
@mariamartin6205 9 месяцев назад
Thanks so much, this was really well explained and helpful.
@jagadeshkumar6174
@jagadeshkumar6174 2 года назад
Thank you, very clear and nice tutorial......
@erison6791
@erison6791 Год назад
Thank you it is wonderful explanation. You answered my question perfectly.
@lukmanmanggo
@lukmanmanggo Год назад
Hi. very easy tutorial bro. As very beginner on python I can get it easy. Salute
@as8401
@as8401 Год назад
very very clear thank you so much for this fantastic video...
@nyashagracenhandara7757
@nyashagracenhandara7757 2 года назад
thank you the explanation is clear and helpful
@user-eg3sg1bz7g
@user-eg3sg1bz7g 5 месяцев назад
this is so good and easy to understand thank you
@vndsanju9865
@vndsanju9865 20 дней назад
chala chala TQ anna nuvu chepindhi chala thoraga ardham chesukunanu and chala bhaga ardham iendhi
@abdoulkarim1468
@abdoulkarim1468 Год назад
thank you ; very good explanation
@kushangshah-be7hn
@kushangshah-be7hn Месяц назад
It was help ful, thanks bro
@the-ghost-in-the-machine1108
clear explanation. Thanks
@noorelahi4792
@noorelahi4792 Год назад
Really amazing sir. after that wanna enroll for DS course.
@programsolve3053
@programsolve3053 Месяц назад
Very nice and helpful lesson. Thanks for sharing. 🎉🎉🎉
@priyankajoshi1953
@priyankajoshi1953 Год назад
Very nice explanation 👍
@abebebirhane7332
@abebebirhane7332 2 года назад
good presentation and nice knowledge
@saiprateek6643
@saiprateek6643 Год назад
Great resource for EDA ☺☺
@abouteverything1573
@abouteverything1573 Год назад
Clear explain ❤️
@hibbajameel8779
@hibbajameel8779 10 месяцев назад
Thanks! You help me in my project ❤
@motivation_for_everything470
@motivation_for_everything470 2 года назад
really nice session
@hmuhamadzulfitri
@hmuhamadzulfitri 3 месяца назад
Addition: 1- In case, you want to **impute** the null values of numerical column, you can check the distribution of the values first; If it's not skewed, you may use mean. In case it is skewed, you may use median. 2- Generally, before we **delete** null values, we can check the proportion of the null values. If it's less than 5 % of the total dataset, we can opt to delete the null values. However, always take the context of our data before making any decision with the null values. 😬
@radhakrishna.kalluri7192
@radhakrishna.kalluri7192 2 года назад
Good job... keep up good work
@poornimachougale8903
@poornimachougale8903 4 месяца назад
thanks for the informative video..🙏
@moatazsakr5435
@moatazsakr5435 2 года назад
thanks so much on this video ❤
@khushaldodeja8267
@khushaldodeja8267 Год назад
Clean. Thanks!
@Chris-si4ox
@Chris-si4ox 8 месяцев назад
this is brilliant thanks
@falcan7752
@falcan7752 3 месяца назад
Nice one Mate!!!!
@milliekim5072
@milliekim5072 2 года назад
Thank you so much!
@raghunathanp3734
@raghunathanp3734 3 года назад
Great content
@tarblood
@tarblood 2 года назад
thnx it is a good explanation
@navaneethangn1215
@navaneethangn1215 2 года назад
Thanks Dude!
@Ayanshedipelly2312
@Ayanshedipelly2312 9 дней назад
We have to take care of data types also before filling with any value
@csit3093
@csit3093 10 месяцев назад
Super class
@djaysse
@djaysse 2 года назад
Thank you, your explanations are very clear! How can I follow more courses by Akshit Madan?
@srikanthkoltur6911
@srikanthkoltur6911 3 года назад
It was truly great thanks
@AteetNP
@AteetNP Год назад
when should we drop a row?, i'm always fill the values with mean, median, mode etc, because rest of the columns seems importand.
@bagushari1886
@bagushari1886 Год назад
How to fillna using interpolate method in the some column in once time?
@bennguyen1313
@bennguyen1313 7 месяцев назад
How would you fill empty values (NaN or NA) in a list or dataframe with the last known good value?
@kakashiaravind221
@kakashiaravind221 Год назад
Sir, Let us the above as same example, now i need to save the dataset(after handiling the missing value) as csv file
@johnbainbridge1931
@johnbainbridge1931 11 месяцев назад
I need intelligent filling, eg filling NaN with the mean of a data observation's category. E.g. car weight is missing, but we know it's SUV, so we apply average SUV weight.
@mohdzohairrizvi4377
@mohdzohairrizvi4377 Год назад
how to replace the value of only a particular column by the mean of that column?
@jimymunandar5319
@jimymunandar5319 Год назад
how about fill the null value if the datasets is categkrical
@VoidmanEric
@VoidmanEric 2 месяца назад
so at 21:50 limit direction = 'forward" does work similar to method = 'pad"?
@nikomangrustini7553
@nikomangrustini7553 Год назад
I'm sorry Mr, can you make tutorial handling missing values with interpolasi linier method?
@haripriya9101
@haripriya9101 5 месяцев назад
can we have a mean value for pad or bill
@ajaykushwaha-je6mw
@ajaykushwaha-je6mw 2 года назад
Hi Team, I want to replace missing value in original df. I used below code but it is not working, kindly help. df[(df['Age'].isnull()) & (df['Pclass']==2)].fillna(29)
@venkateshpeddinti5601
@venkateshpeddinti5601 9 месяцев назад
👏
@v44s82
@v44s82 6 месяцев назад
#1 df_rec = pd.read_csv("recommendation.csv") print(df_rec) print(df_rec.dtypes)
@user-rv3lx6yr7p
@user-rv3lx6yr7p Год назад
Hi Sir, great video, one question, when fill in the mean(), or max() for certain column, the entire whole dataframe was filled in with that mean() even the categorical column, can I just fill in the mean for that column but keep the other columns unchanged?
@mohdzohairrizvi4377
@mohdzohairrizvi4377 Год назад
did you get the answer to your question? I also needed the same question to be answered.
@jodysidney9761
@jodysidney9761 Год назад
@@mohdzohairrizvi4377 Create a dictionary eg fillna({'colunmname1': 0, 'columnname2':5}). It will replace nulls in column1 with 0 and nulls in column 2 with 5
@v44s82
@v44s82 6 месяцев назад
#2 f = lambda df=df_rec: df.isna().sum(axis=0) result = f(df_rec) print(result)
@sravankumar3411
@sravankumar3411 Год назад
Bro hw remove the $ symbol in column
@hemkumarreddymaryada8140
@hemkumarreddymaryada8140 Год назад
Find the number of rows with missing values means Can I use df.isnull().sum().sum() in Python ? Can anyone , please answer me ?
@uniqueuday8569
@uniqueuday8569 7 месяцев назад
Filling and replacing is same i think?
@mikefranko2832
@mikefranko2832 7 месяцев назад
But does it make any sense, to fill NA values with the next or the previous value? Or even more useless to fill it with a 0 or 5? Why would you do this?
@rajulgupta3614
@rajulgupta3614 4 месяца назад
you should explain in which scenario which type of filling method is appropriate or suitable this is not a good video for example if we have outliers then we can not use mean
@sudeep2580
@sudeep2580 2 года назад
print"(Thanks for showing so many methods")
@v44s82
@v44s82 6 месяцев назад
A LEUZ L fichier .zip eli baathhouli ghazi mafihech questionet, fih les fichiers csv wl fichier jupyter mais maghir questions, EKTEBLI LES QUESTIONS 1) ... 2).. F KOL COMMENTAIRE WAHDOU WALA MABADDHOM WALA KIMA THEB wena taw nekteblek b ay façon juste hajti bel question chnia 1) .. 2) .. 3) ..
@hadirdammak5055
@hadirdammak5055 6 месяцев назад
hey
@v44s82
@v44s82 6 месяцев назад
ebaathouli les questions ektebli juste 1) .. wala 2).. commentaire w to njeweb west l comment l fichier eli baathou ghazi mafihech questions ferghin 1) 2) 3) ...
@fernandojackson7207
@fernandojackson7207 Год назад
I used the nan at the Indian restaurant and the waiter brought some bread.
@v44s82
@v44s82 6 месяцев назад
#3 df_rec = df_rec.dropna(subset=["recommendation"]) df_rec = df_rec.dropna(subset=df_rec.columns) df_rec = df_rec.drop_duplicates() print(f(df_rec)) df_rec
Далее
How do I handle missing values in pandas?
14:28
Просмотров 196 тыс.
Exploratory Data Analysis with Pandas Python
40:22
Просмотров 436 тыс.
Don't Replace Missing Values In Your Dataset.
6:10
Просмотров 8 тыс.
How To Handle Missing Values in Categorical Features
6:22