실무에서의 데이터 조인

스프레드시트 사용자를 위한 Pandas 조인

John Miller

Principal Data Scientist

열과 인덱스 혼합하기

인덱스-열 혼합

teams.merge(positions, left_on='player_id', right_index=True)

or

positions.merge(teams, left_index=True, right_on='player_id')
스프레드시트 사용자를 위한 Pandas 조인

겹치는 열 이름 처리

겹치는 열 이름

current.merge(drafted, on='name', suffixes=('_current', '_drafted'))
스프레드시트 사용자를 위한 Pandas 조인

테이블별 행 식별

테이블 표시기

current.merge(drafted, how='outer', on='name', suffixes=('_current', '_drafted'),
               indicator=True)
스프레드시트 사용자를 위한 Pandas 조인

키로 행 정렬하기

정렬된 행

current.merge(drafted, on='name', suffixes=('_current', '_drafted'),
               sort=True)
스프레드시트 사용자를 위한 Pandas 조인

연습해 봅시다!

스프레드시트 사용자를 위한 Pandas 조인

Preparing Video For Download...