AI·빅데이터 융합 경영학 Study Note

'Series' object has no attribute 'split' 본문

기타/오류 해결

'Series' object has no attribute 'split'

SubjectOwner 2023. 11. 23. 17:29

문제 코드

apart_df1['구']= apart_df1['행정구역'].split(' ')[1]

 

csv 파일은 이런 형식이고 '구' 데이터만 필요하다.

오류 코드

'Series' object has no attribute 'split'

 

해결

apart_df1['구']= str(apart_df1['행정구역']).split(' ')[1]