Merging Data in Pandas | #35 of 53: The Complete Pandas Course

Опубликовано: 10 Июнь 2022
на канале: Selva Prabhakaran (ML+)
437
14

Course materials Github: https://github.com/machinelearningplu...

Join Pandas course on ML+: https://edu.machinelearningplus.com/c...

-----------------------------------------

When you have two or more data frames, and you want to join those data frames based on one common column between them to do that you can use joining.

Complete Pandas Course for free: http://surl.li/cectw

Checkout complete Data Scientist Learning Path here: https://edu.machinelearningplus.com/s...
Join ML+ membership for exclusive Data science content

🔹 Merge Two DataFrames in Pandas with Easy Steps.


A very typical use cases, sales data, let's take sales data is present in one data frame. This data frame contains the product IDs, one of the columns, this is product ID. There could also be another data frame that contains details about the products.

So this also contains product ID. But this contains information about the various product characteristics, what category belongs to what subcategory what is the pricing and so on. Whereas the sales data tells you the various information about the sale of the product to various different customers.

Now when you're doing the analysis, you might want to join both of this information that is you want to join the product information to your sales data. To get a more detailed analysis. In such cases, you want to merge both of these data frames based on this product ID column, which is common between both of them.

This is one typical use case, another use cases say you have a data frame. So you have this Titanic data from which we have been dealing with. In this data frame, you have your class column, and you have your age column, right this is class, this is age, suppose you want to create a new column that contains the average average age for that class.

This class one, class one, class two, class three, and so on, you have the different ages, right, you want to find the average age. So for all the class ones, you want to find the average age and put here. Likewise, when the value is two, here, you want to put the average age when class is equal to two like that, you want to create a new variable.

#machinelearningplus #python #pandasdatascience


Let me know in the comments section if you have any questions!


🤝 Like, Share, Subscribe for more!


Follow us on our social media handles for all updates, events and live sessions-

✅ Instagram:   / machinelearningplus  

✅ LinkedIn:   / machine-learning-plus  

✅ YouTube:    / numyard  

✅ Twitter:   / r_programming  

✅ Website: https://www.machinelearningplus.com/


If you enjoyed this video, be sure to throw it a like and make sure to subscribe to not miss any future videos!


Thanks for watching!