RUVIDEO
Поделитесь видео 🙏

How to Join Data Frames in Pandas (Python) смотреть онлайн

↓ Code Available Below! ↓

This video shows how to join pandas data frames using the merge function. Joining data that resides in different tables is a common data preparation task when creating an analytical data set from multiple sources. The merge function allows you to perform inner, outer, left and right joins by changing the how argument.

If you find this video useful, like, share and subscribe to support the channel!
► Subscribe: https://www.youtube.com/c/DataDaft?sub_confirmation=1


Code used in this Python Code Clip:

import pandas as pd

data1 = pd.DataFrame({"character": ["Goku","Vegeta", "Nappa","Gohan","Piccolo"],
"power level": [12000, 16000, 4000, 1500, 3000],
"uniform color": ["orange", "blue", "black", "orange", "purple"]})

data2 = pd.DataFrame({"character": ["Gohan","Goku", "Tien","Krillin","Yamcha"],
"power level": [1500, 12000, 2000, 2000, 1500],
"unif_color": ["purple", "orange", "green", "orange", "orange"]})

data1
data2

# Use df.merge() to join data frames

data1.merge(data2,
how = "outer", # join type
on="character") # key column to join on

# Join on multiple key columns
data1.merge(data2,
how = "outer", # join type
on = ["character", "power level"]) # join on multiple cols

# Join columns with different names

# Rename columns so that they match
data2.rename(columns={'unif_color':'uniform color'}, inplace=True)

# Then join the data
data1.merge(data2,
how = "outer",
on = ["character", "power level", "uniform color"])


* Note: YouTube does not allow greater than or less than symbols in the text description, so the code above will not be exactly the same as the code shown in the video! I will use Unicode large < and > symbols in place of the standard sized ones. .


⭐ Kite is a free AI-powered coding assistant that integrates with popular editors and IDEs to give you smart code completions and docs while you’re typing. It is a cool application of machine learning that can also help you code faster! Check it out here: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=datadaft&utm_content=description-only

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to Join Data Frames in Pandas (Python)» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.