Skip to content

Added warning about attribute access on 'reserved' words #8100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/source/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,17 @@ new column.
.. warning::

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

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

- Similarly, the attribute will not be available if it conflicts with any of the following list: ``index``,
``major_axis``, ``minor_axis``, ``items``, ``labels``.

- In any of these cases, standard indexing will still work, e.g. ``s['1']``, ``s['min']``, and ``s['index']`` will
access the corresponding element or column.

- The ``Series/Panel`` accesses are available starting in 0.13.0.

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