pandas merge (feat. join)
# DataFrame의 merge(결합, 합병하다) # Database의 table의 join과 같은 개념. import numpy as np import pandas as pd data1 = {'학번': [1, 2, 3, 4], '이름': ['아이유','김연아','홍길동','강감찬'], '학과': ['철학', '경영', '컴퓨터', '물리']} data2 = {'학번': [1, 2, 4, 5], '학년': [2, 4, 3, 1], '학점': [1.5, 2.0, 4.1, 3.8]} df1 = pd.DataFrame(data1) df2 = pd.DataFrame(data2) display(df1) display(df2) # merge ( inner join ) - 연결점이 있는것만 연결해서 만든다 df3 ..
2021.08.23