Skip to content

Commit 9b12ccb

Browse files
FragLegsjreback
authored andcommitted
DOC: Added warning about attribute access on 'reserved' words (GH8082)
1 parent 6aea232 commit 9b12ccb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/source/indexing.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,17 @@ new column.
232232
.. warning::
233233

234234
- You can use this access only if the index element is a valid python identifier, e.g. ``s.1`` is not allowed.
235-
see `here for an explanation of valid identifiers
235+
See `here for an explanation of valid identifiers
236236
<http://docs.python.org/2.7/reference/lexical_analysis.html#identifiers>`__.
237237

238238
- The attribute will not be available if it conflicts with an existing method name, e.g. ``s.min`` is not allowed.
239239

240+
- Similarly, the attribute will not be available if it conflicts with any of the following list: ``index``,
241+
``major_axis``, ``minor_axis``, ``items``, ``labels``.
242+
243+
- In any of these cases, standard indexing will still work, e.g. ``s['1']``, ``s['min']``, and ``s['index']`` will
244+
access the corresponding element or column.
245+
240246
- The ``Series/Panel`` accesses are available starting in 0.13.0.
241247

242248
If you are using the IPython environment, you may also use tab-completion to

0 commit comments

Comments
 (0)