How to Replace Values of Dataframes | Replace, Where, Mask, Update and More

  Рет қаралды 28,396

Mısra Turp

Mısra Turp

Күн бұрын

While cleaning up outliers, filling in missing values, or just doing some data maintenance we need to update the values in our Pandas dataframe. Sometimes you select a subset of the original dataframe, and sometimes it needs to be pinpointed with an index value. So in this video, I show you every way I know how to replace and/or modify values in your pandas dataframes.
Get the code here: github.com/misraturp/Pandas-d...
Find missing values in data with Pandas | Beginner tutorial - • Find missing values in...
Pandas functions: Apply vs. Map vs. Applymap - • Pandas Functions: Appl...
00:00 Introduction
00:29 "fillna"
01:46 "replace"
03:09 "loc" and "at"
05:59 "np.where"
07:25 "mask"
08:30 "cut"
09:35 "update"
10:32 apply, map and applymap
10:54 Grab your Pandas Cheat Sheet!
👋 Keep in touch?
==========================
🐥 Twitter - / misraturp
🔗 LinkedIn - / misraturp
📹 KZbin - / @misraturp
🌎 Website - misraturp.com/
Courses & resources
============================
📙 Fundamentals of Deep Learning in 25 pages
misraturp.gumroad.com/l/fdl
👩‍💻 Hands-on Data Science: Complete your first portfolio project
www.misraturp.com/hods
📥 Streamlit template
misraturp.gumroad.com/l/stemp
🤖 Deep Learning 101 with Python and Keras (FREE)
• 50 Days of Deep Learning
🏃‍♀️ Data Science Kick-starter mini-course (FREE)
misraturp.gumroad.com/l/kick-...
🐼 Pandas cheat sheet (FREE)
misraturp.gumroad.com/l/pandascs
📝 NNs hyperparameters cheat sheet (FREE)
misraturp.gumroad.com/l/hcs

Пікірлер: 62
@misraturp
@misraturp Жыл бұрын
👉 All you need to know about Pandas in one place! Download my Pandas Cheat Sheet (free) misraturp.gumroad.com/l/pandascs
@message59
@message59 6 ай бұрын
hands down your videos are the best ressources I found to these kind of topics thanks a lot for making these videos✌🏻😁
@saheedoyewole9424
@saheedoyewole9424 Жыл бұрын
Thanks a lot Misra, you're doing a wonderful job.
@misraturp
@misraturp Жыл бұрын
Thank you!
@maxinechantel8361
@maxinechantel8361 Жыл бұрын
Hi Misra, thank you for your videos they are helping me to learn Pandas. You explain so simple and it is really encouraging.
@misraturp
@misraturp Жыл бұрын
That's amazing to hear, thank you Maxine!
@lucifer-kq1sc
@lucifer-kq1sc Жыл бұрын
you're making my life easier with these tuts :')
@bay-bicerdover
@bay-bicerdover Жыл бұрын
even easier!?
@burakceylan.92
@burakceylan.92 Жыл бұрын
Crystal clear speak and to the point infos. Thank you
@misraturp
@misraturp Жыл бұрын
You're very welcome!
@avonstar8893
@avonstar8893 Жыл бұрын
Very helpful Misra. Thank you.
@misraturp
@misraturp Жыл бұрын
Great to hear :)
@himanshupandey9902
@himanshupandey9902 Жыл бұрын
Hey, again. You really make things simpler, so that a laymen also can understand.
@misraturp
@misraturp Жыл бұрын
Amazing to hear!
@ArnauViaM
@ArnauViaM Жыл бұрын
pandas cut seems extremely useful! Thanks
@misraturp
@misraturp Жыл бұрын
I know right! You're welcome.
@chastippett
@chastippett Жыл бұрын
super helpful. have never seen the pd.cut function - Thank you
@misraturp
@misraturp Жыл бұрын
You're very welcome!
@isha4350
@isha4350 Ай бұрын
Informative video .
@Asma-ir8rr
@Asma-ir8rr 5 ай бұрын
I like your explanation 👌🏻♥️
@birsenbas1009
@birsenbas1009 Жыл бұрын
Hi Mısra, you're really have great explanations. I have learned a lot of and useful things even a few days. I am really excited to continue listening your videos aas a new data scientist candidate. Also you make me very motivated. Thanks a lot again!
@misraturp
@misraturp Жыл бұрын
That's great to hear Birsen! Happy to hear you like the videos and that they motivate you.
@kennethstephani692
@kennethstephani692 Жыл бұрын
Terrific Video!!
@misraturp
@misraturp Жыл бұрын
Thank you!
@reledata8035
@reledata8035 11 ай бұрын
thank you Misra
@mehdismaeili3743
@mehdismaeili3743 Жыл бұрын
Excellent, thanks.
@misraturp
@misraturp Жыл бұрын
You're welcome!
@GregThatcher
@GregThatcher Ай бұрын
Thanks!
@graceblomqvist5378
@graceblomqvist5378 Жыл бұрын
Very very good! thx!
@misraturp
@misraturp Жыл бұрын
Glad you like it!
@mjacfardk
@mjacfardk Жыл бұрын
Thank you Pls video of pd.cut and filling/imputing missing values
@misraturp
@misraturp Жыл бұрын
Yes, working on that one now! Thank you for the suggestion!
@curtisjackson3377
@curtisjackson3377 Жыл бұрын
Hey MIsra, thanks for another simple to understand video. Can you possibly make a similar thread on pandas dataframe Join/Merge? That would be great help. Thanks again. Cheers 🍻
@Kidpambi
@Kidpambi Жыл бұрын
This would be very helpful 🎉
@misraturp
@misraturp Жыл бұрын
Hey Curtis, you're very welcome. :) I actually have that video already: kzbin.info/www/bejne/bWmbfHuIeqmVjpo
@durgav8122
@durgav8122 8 ай бұрын
Hai Mam....Can you please come with the videos for SQL in data Analytics.....?
@e.t.499
@e.t.499 Жыл бұрын
Hey Misra, can you make a video about deciding under which conditions we should use normalization or standardization?
@misraturp
@misraturp Жыл бұрын
Great suggestion!
@bay-bicerdover
@bay-bicerdover Жыл бұрын
take that as a no
@vrbaac1641
@vrbaac1641 Жыл бұрын
Hi, Thank you for this video... it is very clear and easy to follow... I also want to ask... In case of a data frame having negative numbers, is it possible to replace these negative numbers by its corresponding absolute value, using the same routine in the video? thank you ^^
@misraturp
@misraturp Жыл бұрын
I don't know this off the top of my head but I'm sure there is a quick way to achieve this using Pandas :)
@learnwithgandalf
@learnwithgandalf Жыл бұрын
cool mam
@muriloambrozio7563
@muriloambrozio7563 7 ай бұрын
Could I use a list in the loc. Method?
@sakhachowdhury5266
@sakhachowdhury5266 22 күн бұрын
Can we use any function to replace a data.like normally we replace a data with tha mean of that column.is there any other method instead of mean.
@user-ru5yt4vg4v
@user-ru5yt4vg4v 3 ай бұрын
Hi Misra, If we have a column where we are having a message which is returned from the device, so from this message how can we create a new column by taking keyword from the existing column and display the status of it in the new column by using python?
@barisbulut7193
@barisbulut7193 Жыл бұрын
selam, thanks for the info. i have a probem in changing characters within the cells. in my dataframe, some of values are for instance: 12.4 and some of them are 12,4, meaning some are seperated with comma, and some are seperated with dot. how can i change all the dots with commas without changing the values. thanks
@bay-bicerdover
@bay-bicerdover Жыл бұрын
watch the vid
@vashisht1
@vashisht1 2 ай бұрын
When didn't you use replace like this data[ 'Agency'].replace( { dict}) Inside dictionary I will give all the old values as key and new values a pair ..
@SlimPit
@SlimPit Жыл бұрын
Hi, i have a question that i dont know. I need to change a specific value in a specific line in my Dataframe. Example in your Dataframe in Column "Job ID" in the line (1), i want to change the value 379094 to another value, how can i do this? I tried to loc but not worked. Can someone help please, thank you. Sorry for the english, im brazilian.
@bay-bicerdover
@bay-bicerdover Жыл бұрын
watch the vid
@marcelocarvalho4510
@marcelocarvalho4510 Жыл бұрын
Hello, I loved your video! I would like to ask a question. In this case, the intent would be data cleaning where I have a dataframe where all the information in the "data" column has characters that shouldn't be there, for example: '01012023TT00'. I would like to remove these "TT00" characters. How should I do? I'm doing it this way, but it doesn't update the dataframe.: import pandas as pd import numpy as np df = pd.read_csv('/content/HRDataset_v14.csv') df.head() df['Employee_Name'].str.replace('Anderson, Carol','Anderson') df ################ If we put the df = df['Employee_Name'].str.replace('Anderson, Carol','Anderson') It will update, but not in the dataframe.
@bay-bicerdover
@bay-bicerdover Жыл бұрын
watch the vid
@tonywillingham8109
@tonywillingham8109 Жыл бұрын
How does one download the chest sheet? It is unclear.
@misraturp
@misraturp Жыл бұрын
Here is the link: misraturp.gumroad.com/l/pandascs
@Krishnapatil1996
@Krishnapatil1996 Жыл бұрын
as compared to data cleansing .... till the end video, I just see you ...
@arvinstatistics
@arvinstatistics 19 күн бұрын
You are so pretty and smart.
@myselfandpesit
@myselfandpesit Жыл бұрын
Too many ways to do it makes it quite confusing for me
@bay-bicerdover
@bay-bicerdover Жыл бұрын
themore thebetter
@user-ss9je8hf8j
@user-ss9je8hf8j 9 ай бұрын
aww
@comment8767
@comment8767 2 ай бұрын
Misra is too distracting .... makes it difficult to concentrate on the code...
@barspinoza
@barspinoza Жыл бұрын
Thanks!
@misraturp
@misraturp Жыл бұрын
You're very welcome!
How to Reshape Dataframes | Pivot, Stack, Melt and More
12:49
Mısra Turp
Рет қаралды 23 М.
Find missing values in data with Pandas | Beginner tutorial
12:33
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 58 МЛН
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 9 МЛН
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 107 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 1,3 МЛН
Streamlit Elements You Should Know About in 2023
14:31
Mısra Turp
Рет қаралды 88 М.
How do I merge DataFrames in pandas?
21:49
Data School
Рет қаралды 157 М.
How to use the Pandas GroupBy function | Pandas tutorial
19:03
Mısra Turp
Рет қаралды 28 М.
My top 25 pandas tricks
27:38
Data School
Рет қаралды 265 М.
Learning Pandas for Data Analysis? Start Here.
22:50
Rob Mulla
Рет қаралды 81 М.
Pandas Functions: Apply vs. Map vs. Applymap
11:53
Mısra Turp
Рет қаралды 24 М.
WWDC 2024 Recap: Is Apple Intelligence Legit?
18:23
Marques Brownlee
Рет қаралды 6 МЛН
Asus  VivoBook Винда за 8 часов!
1:00
Sergey Delaisy
Рет қаралды 1,1 МЛН