Pandas concat vs append vs join vs merge
-
Concat gives the flexibility to join based on the axis( all rows or all columns)
-
Append is the specific case(axis=0, join='outer') of concat
-
Join is based on the indexes (set by set_index) on how variable =['left','right','inner','couter']
-
Merge is based on any particular column each of the two dataframes, this columns are variables on like 'left_on', 'right_on', 'on'
출처: stackoverflow.com/questions/15819050/pandas-dataframe-concat-vs-append
728x90
'PL(Programming Language) > Python' 카테고리의 다른 글
[Python] 판다스 데이터프레임(Pandas DataFrame) sys:1: DtypeWarning: Columns have mixed types.Specify dtype option on import or set low_memory=False. 무시하기 (1) | 2021.03.08 |
---|---|
[Python] 판다스 데이터프레임(pandas dataframe) SettingWithCopyWarning 해결 (0) | 2021.03.08 |
[Python] 2차원 리스트 1차원 리스트로 변경, sum (0) | 2021.03.07 |
[Python] Pandas Dataframe 중복 제거, distinct한 값 확인 (0) | 2021.02.18 |
[Python] 코드 실행 시간 측정 (0) | 2021.02.16 |