Professional Documents
Culture Documents
J O I N I N G D ATA W I T H PA N D A S
Tables = DataFrames
Merging = Joining
print(wards_census.shape)
(50, 9)
One-To-One = Every row in the le table is related to only one row in the right table
One-To-Many = Every row in le table is related to one or more rows in the right table
(50, 4)
print(ward_licenses.shape)
(10000, 9)
df1.merge(df2, on='col') \
.merge(df3, on='col')
Four tables:
df1.merge(df2, on='col') \
.merge(df3, on='col') \
.merge(df4, on='col')