– pandas iloc函数
train.iloc[0:4]
0:4是选取0,1,2,3这四行,这里是前闭后开集合
train.iloc[:,:8]
选取位置为[0,8)列的整列数据
train.iloc[0:2,8]
选取位置为8的列的[0,2)行的数据
`
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/176633.html原文链接:https://javaforall.net
pandas iloc函数pandasiloc 函数 train iloc 0 4 0 4 是选取 0 1 2 3 这四行 这里是前闭后开集合 train iloc 8 选取位置为 0 8 列的整列数据 train iloc 0 2 8 选取位置为 8 的列的 0 2 行的数据
train.iloc[0:4]
0:4是选取0,1,2,3这四行,这里是前闭后开集合
train.iloc[:,:8]
选取位置为[0,8)列的整列数据
train.iloc[0:2,8]
选取位置为8的列的[0,2)行的数据
`
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/176633.html原文链接:https://javaforall.net