filmov
tv
Python Beginner/Noob Tutorial - How to merge/join/combine datasets using the Pandas module

Показать описание
This is a very basic guide for merging datasets in Python using the Pandas module. I will start from opening a new Python file, using Pip to get Pandas (and Openpyxl if you are working with MS Excel data), to merging two datasets. I will also show you a left and right join, and eventually how to export your data.
As I mention in the video joins can get much more complicated with functions like inner/outer joins, etc. Since this is a tutorial intended for beginners, I didn't want to get into that too much. However, I've included the Pandas documentation below.
Finally, if you'd like to copy and paste the Python code, I've provided it below:
import pandas as pd
df1 = pd.DataFrame(dataset1)
df2 = pd.DataFrame(dataset2)
As I mention in the video joins can get much more complicated with functions like inner/outer joins, etc. Since this is a tutorial intended for beginners, I didn't want to get into that too much. However, I've included the Pandas documentation below.
Finally, if you'd like to copy and paste the Python code, I've provided it below:
import pandas as pd
df1 = pd.DataFrame(dataset1)
df2 = pd.DataFrame(dataset2)