AttributeError: 'DataFrame' object has no attribute 'ix'

df = DataFrame(np.random.randn(7,3))
df.ix[:5,1] = NA

# 报错 AttributeError: 'DataFrame' object has no attribute 'ix'
# 改为
df.iloc[:5,1] = NA

 

posted @ 2021-02-13 22:06  OTAKU_nicole  阅读(6515)  评论(0)    收藏  举报