pandas iloc, ix, loc 区别 详细分析
2017-08-05 本文已影响435人
Stevent
首先,简单来说:
loc 作用在index上按标签选择(文本)
iloc 作用在index上按位置选择(所以只接受整形)
ix 通常习惯像loc, 但是如果index中没有文本,就按iloc
首先,简单来说:
loc 作用在index上按标签选择(文本)
iloc 作用在index上按位置选择(所以只接受整形)
ix 通常习惯像loc, 但是如果index中没有文本,就按iloc