IndexError

Develop/TroubleShooting

IndexError: Column(s) contents already selected 해결

pandas.groupby 실행 중 이러한 오류가 떴다면 contents에 해당하는 컬럼이 groupby 후 계산할 수 없는 컬럼일 확률이 높다. 따라서 type이 object일 경우, contents.fillna('')를 이용해 빈 행을 채워줘야 한다.

향식이
'IndexError' 태그의 글 목록