Skip to content

Commit 223d0a5

Browse files
committed
DOC: indexing.rst edits
1 parent 25fd443 commit 223d0a5

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

doc/source/dsintro.rst

+2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ Using the ``get`` method, a missing label will return None or specified default:
156156
157157
s.get('f', np.nan)
158158
159+
See also the :ref:`section on attribute access<indexing.attribute_access>`.
160+
159161
Vectorized operations and label alignment with Series
160162
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161163

doc/source/indexing.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ Attribute Access
174174

175175
.. _indexing.df_cols:
176176

177+
.. _indexing.attribute_access:
178+
177179
You may access an index on a ``Series``, column on a ``DataFrame``, and a item on a ``Panel`` directly
178180
as an attribute:
179181

@@ -199,7 +201,13 @@ Setting is allowed as well
199201
200202
.. warning::
201203

202-
You can use this convience access only if the index element is a valid python string, e.g. ``s.1`` is not allowed.
204+
- You can use this access only if the index element is a valid python identifier, e.g. ``s.1`` is not allowed.
205+
see `here for an explanation of valid identifiers
206+
<http://docs.python.org/2.7/reference/lexical_analysis.html#identifiers>`__.
207+
208+
- The attribute will not be available if it conflicts with an existing method name, e.g. ``s.min`` is not allowed.
209+
210+
- The ``Series/Panel`` accesses are available starting in 0.13.0.
203211

204212
If you are using the IPython environment, you may also use tab-completion to
205213
see these accessable attributes.

doc/source/io.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ is ``None``. To explicity force ``Series`` parsing, pass ``typ=series``
11231123
- ``numpy`` : direct decoding to numpy arrays. default is False;
11241124
Note that the JSON ordering **MUST** be the same for each term if ``numpy=True``
11251125
- ``precise_float`` : boolean, default ``False``. Set to enable usage of higher precision (strtod) function when decoding string to double values. Default (``False``) is to use fast but less precise builtin functionality
1126-
- ``date_unit`` : string, the timestamp unit to detect if converting dates. Default
1126+
- ``date_unit`` : string, the timestamp unit to detect if converting dates. Default
11271127
None. By default the timestamp precision will be detected, if this is not desired
11281128
then pass one of 's', 'ms', 'us' or 'ns' to force timestamp precision to
11291129
seconds, milliseconds, microseconds or nanoseconds respectively.
@@ -1201,11 +1201,11 @@ nanoseconds
12011201
dfju
12021202
12031203
# Let Pandas detect the correct precision
1204-
dfju = pd.read_json(json)
1204+
dfju = pd.read_json(json)
12051205
dfju
12061206
12071207
# Or specify that all timestamps are in nanoseconds
1208-
dfju = pd.read_json(json, date_unit='ns')
1208+
dfju = pd.read_json(json, date_unit='ns')
12091209
dfju
12101210
12111211
.. ipython:: python

0 commit comments

Comments
 (0)