다른 길이의 팬더 데이터 프레임을 두 개 비교하고 일치하는 인덱스 번호를 식별하고 싶습니다. 값이 일치하면 새 열의 값에 플래그를 지정하고 싶습니다. 이러한 정말 색인 경우새 열의 데이터 프레임 간 플래그 유사도
df1:
Index Column 1
41660 Apple
41935 Banana
42100 Strawberry
42599 Pineapple
df2:
Index Column 1
42599 Pineapple
Output:
Index Column 1 'Matching Index?'
41660 Apple
41935 Banana
42100 Strawberry
42599 Pineapple True
가능한 중복 [ 두 개의 Python Pandas 데이터 프레임의 두 열을 비교하고 공통 행을 얻는 방법] (http://stackoverflow.com/questions/30291032/comparing-2-columns-of-two-python-pandas-dataframes-and-getting-the-common -rows) – Andy