
Python DataFrame NaN 문자열 결합 na_rep
DataFrame에 저장된 문자열을 결합하기 위해str.cat()또는+연산자를 사용합니다.문자열을 결합할 때 NaN 값이 있는 경우에는 문자열이 결합되지 않고 NaN으로 표시됩니다.na_rep를 사용해 NaN 대신에 다른 문자를 지정해 문자를 결합할 수 있습니다.먼저 샘플 데이터를 준비하겠습니다.import pandas as pdimport numpy as npdf = pd.DataFrame({'name': , 'age': , 'state': , 'point': , 'col_NaN': })print(df)결과 name age sta...