在python中,对于packagepandas中的DataFrame中的数据切片,.ix已经从pandas 0.20.0中弃用。官方网站提供了另一种解决方案,可以使用.loc或.iloc来进行混合选择(http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html)。索引可以帮助提取多行。相比之下,columns.get_loc列似乎最多只能选择一列。是否有一个替代函数可以使用.iloc以混合方式提取多个列?在
Tags:
是的,函数名为^{} ,并按名称列表返回列或索引的位置。在
使用方法如下:
相关问题 更多 >
编程相关推荐