@@ -121,8 +121,14 @@ Sorting by values
121
121
Selection
122
122
---------
123
123
124
- See the :ref: ` Indexing section < indexing >`
124
+ .. note ::
125
125
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.
126
132
127
133
Getting
128
134
~~~~~~~
@@ -230,7 +236,8 @@ For getting fast access to a scalar (equiv to the prior method)
230
236
df.iat[1 ,1 ]
231
237
232
238
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.
234
241
235
242
.. ipython :: python
236
243
@@ -239,7 +246,8 @@ python/numpy allow slicing past the end of an array without an associated error.
239
246
x[4 :10 ]
240
247
x[8 :10 ]
241
248
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.
243
251
244
252
::
245
253
@@ -306,11 +314,13 @@ A ``where`` operation with setting.
306
314
df2[df2 > 0 ] = - df2
307
315
df2
308
316
317
+
309
318
Missing Data
310
319
------------
311
320
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>`
314
324
315
325
Reindexing allows you to change/add/delete the index on a specified axis. This
316
326
returns a copy of the data.
@@ -457,8 +467,8 @@ Append rows to a dataframe. See the :ref:`Appending <merging.concatenation>`
457
467
Grouping
458
468
--------
459
469
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
462
472
463
473
- **Splitting ** the data into groups based on some criteria
464
474
- **Applying ** a function to each group independently
@@ -481,7 +491,8 @@ Grouping and then applying a function ``sum`` to the resulting groups.
481
491
482
492
df.groupby(' A' ).sum()
483
493
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.
485
496
486
497
.. ipython :: python
487
498
@@ -547,10 +558,10 @@ We can produce pivot tables from this data very easily:
547
558
Time Series
548
559
-----------
549
560
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 >`
554
565
555
566
.. ipython :: python
556
567
0 commit comments