Skip to content

Commit c301433

Browse files
committed
Merge pull request #3399 from dengemann/ref_value_data_access_doc
DOC: ref / val caveat, point at pandas methods - thanks!
2 parents 729d333 + d4eef33 commit c301433

File tree

2 files changed

+164
-94
lines changed

2 files changed

+164
-94
lines changed

doc/source/10min.rst

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,14 @@ Sorting by values
121121
Selection
122122
---------
123123

124-
See the :ref:`Indexing section <indexing>`
124+
.. note::
125125

126+
While standard Python / Numpy expressions for selecting and setting are
127+
intuitive and come handy for interactive work, for production code, we
128+
recommend the optimized pandas data access methods, ``.at``, ``.iat``,
129+
``.loc``, ``.iloc`` and ``.ix``.
130+
131+
See the :ref:`Indexing section <indexing>` and below.
126132

127133
Getting
128134
~~~~~~~
@@ -230,7 +236,8 @@ For getting fast access to a scalar (equiv to the prior method)
230236
df.iat[1,1]
231237
232238
There is one signficant departure from standard python/numpy slicing semantics.
233-
python/numpy allow slicing past the end of an array without an associated error.
239+
python/numpy allow slicing past the end of an array without an associated
240+
error.
234241

235242
.. ipython:: python
236243
@@ -239,7 +246,8 @@ python/numpy allow slicing past the end of an array without an associated error.
239246
x[4:10]
240247
x[8:10]
241248
242-
Pandas will detect this and raise ``IndexError``, rather than return an empty structure.
249+
Pandas will detect this and raise ``IndexError``, rather than return an empty
250+
structure.
243251

244252
::
245253

@@ -306,11 +314,13 @@ A ``where`` operation with setting.
306314
df2[df2 > 0] = -df2
307315
df2
308316
317+
309318
Missing Data
310319
------------
311320

312-
Pandas primarily uses the value ``np.nan`` to represent missing data. It
313-
is by default not included in computations. See the :ref:`Missing Data section <missing_data>`
321+
Pandas primarily uses the value ``np.nan`` to represent missing data. It is by
322+
default not included in computations. See the :ref:`Missing Data section
323+
<missing_data>`
314324

315325
Reindexing allows you to change/add/delete the index on a specified axis. This
316326
returns a copy of the data.
@@ -457,8 +467,8 @@ Append rows to a dataframe. See the :ref:`Appending <merging.concatenation>`
457467
Grouping
458468
--------
459469

460-
By "group by" we are referring to a process involving one or more of the following
461-
steps
470+
By "group by" we are referring to a process involving one or more of the
471+
following steps
462472

463473
- **Splitting** the data into groups based on some criteria
464474
- **Applying** a function to each group independently
@@ -481,7 +491,8 @@ Grouping and then applying a function ``sum`` to the resulting groups.
481491
482492
df.groupby('A').sum()
483493
484-
Grouping by multiple columns forms a hierarchical index, which we then apply the function.
494+
Grouping by multiple columns forms a hierarchical index, which we then apply
495+
the function.
485496

486497
.. ipython:: python
487498
@@ -547,10 +558,10 @@ We can produce pivot tables from this data very easily:
547558
Time Series
548559
-----------
549560

550-
Pandas has simple, powerful, and efficient functionality for
551-
performing resampling operations during frequency conversion (e.g., converting
552-
secondly data into 5-minutely data). This is extremely common in, but not
553-
limited to, financial applications. See the :ref:`Time Series section <timeseries>`
561+
Pandas has simple, powerful, and efficient functionality for performing
562+
resampling operations during frequency conversion (e.g., converting secondly
563+
data into 5-minutely data). This is extremely common in, but not limited to,
564+
financial applications. See the :ref:`Time Series section <timeseries>`
554565

555566
.. ipython:: python
556567

0 commit comments

Comments
 (0)