.ix
is deprecated
-
카테고리
-
세부 분야
데이터 분석
-
해결 여부
해결됨
pandas ix 기능 삭제
20.02.16 19:35 작성 조회수 4.03k
3
질문은 아니고 강의 보고 따라하다가 바뀐 부분이 있어서 알려드립니다.
19분 40초 4-7-2.py에서 print(d_frame.ix['one']) 이 부분이 현재 에러가 발생합니다.
예제파일을 받아도 마찬가지입니다.
AttributeError: 'DataFrame' object has no attribute 'ix'
이렇게 뜨는데 찾아보니 최근에 기능이 삭제되었다고 하더군요.
https://stackoverflow.com/questions/59991397/attributeerror-dataframe-object-has-no-attribute-ix
그러면 다른 방법엔 뭐가 있을지 또 알아보니 ix 자리에 loc를 집어넣으니 비슷한 결과값을 불러오네요.
이 부분을 공지로 추가해야하지 않을까 합니다.
답변을 작성해보세요.
0
newbie
2020.04.20
pandas 1.0.0 버전부터 deprecated된 내용이 맞습니다.
iloc를 쓰면될듯합니다 ^^
공식글
https://pandas.pydata.org/pandas-docs/version/1.0.0/whatsnew/v1.0.0.html#removal-of-prior-version-deprecations-changes
관련글
https://stackoverflow.com/questions/59991397/attributeerror-dataframe-object-has-no-attribute-ix
0
답변 2