Skip to content

Commit dfb5585

Browse files
committed
Clarification to .ix functionality
Made clear that .ix does not support positional indexing in the case where the corresponding dimension has an integer index.
1 parent abd5333 commit dfb5585

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

doc/source/indexing.rst

+11-7
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,18 @@ of multi-axis indexing.
9696
See more at :ref:`Selection by Position <indexing.integer>`
9797

9898
- ``.ix`` supports mixed integer and label based access. It is primarily label
99-
based, but will fall back to integer positional access. ``.ix`` is the most
100-
general and will support any of the inputs to ``.loc`` and ``.iloc``, as well
101-
as support for floating point label schemes. ``.ix`` is especially useful
102-
when dealing with mixed positional and label based hierarchical indexes.
103-
As using integer slices with ``.ix`` have different behavior depending on
104-
whether the slice is interpreted as position based or label based, it's
99+
based, but will fall back to integer positional access unless the corresponding
100+
row or column index is of integer type. ``.ix`` is the most general and will
101+
support any of the inputs in ``.loc`` and ``.iloc`` with a notable exception that
102+
``.ix`` does not support positional access in the case when the corresponding
103+
row or column index is of integer type. ``.ix`` also supports floating point
104+
label schemes. ``.ix`` is exceptionally useful when dealing with mixed positional
105+
and label based hierachical indexes.
106+
107+
When the DataFrame has an integer index or integer columns, positional access
108+
is not supported in the corresponding dimension. Thus, in such cases it's
105109
usually better to be explicit and use ``.iloc`` or ``.loc``.
106-
110+
107111
See more at :ref:`Advanced Indexing <advanced>`, :ref:`Advanced
108112
Hierarchical <advanced.advanced_hierarchical>` and :ref:`Fallback Indexing
109113
<advanced.fallback>`

0 commit comments

Comments
 (0)