环境:python 3.4 + pandas 0.19.1
先看一下官方文档对这3个api的描述:
- DataFrame.ix
- A primarily label-location based indexer, with integer position fallback.【支持根据索引值,或者按顺序位置定位】
- .ix[] supports mixed integer and label based access. It is primarily label based, but will fall back to integer positional access unless the corresponding axis is of integer type.【按顺序位置定位,要求索引不能是数字】
- DataFrame.loc
- Purely label-location based indexer for selection by label.【按索引值定位】
- .loc[] is primarily label based, but may a