私信  •  关注

ndclt

ndclt 最近创建的主题
ndclt 最近回复了
5 年前
回复了 ndclt 创建的主题 » 在Python数据框中选择列时出错

看起来是这样的 students 是您的索引名。为了得到它,您可以重置索引:

Names = df.reset_index(drop=False)['students']