我制作了一个pandas数据帧,但当我调用df.columns时,我得到了RangeIndex(start=0,stop=17,step=1(。发生了什么?我只想得到我的标题的列表
这篇文章详细介绍了您的问题:从Panda DataFrame列标题获取列表
简而言之,您可以使用:df.columns.tolist()
或df.columns.values.tolist()