python - pd.concat() 데이터프레임 합치기 / table merge, stack
테이블 열이나 행의 인덱스가 같은 경우에, 여러 개의 표를 합쳐서 보고 싶은 경우가 있다. pd.concat() 기능을 활용하면 쉽게 표를 합칠 수 있다. 예제 #Pandas불러오기 import pandas as pd #데이터프레임 만들기 data1 = pd.DataFrame({'date':['2021-10-03','2021-10-04','2021-10-05'], 'category':['transportation','coffee','meal'], 'amount':['7500','5000','19000'], 'payment method':['cash','cash','card']}, ) data2 = pd.DataFrame({'date':['2021-09-04','2021-09-06','2021-09-07'..