20
20
Cookbook
21
21
********
22
22
23
- This is a respository for *short and sweet * examples and links for useful pandas recipes.
23
+ This is a repository for *short and sweet * examples and links for useful pandas recipes.
24
24
We encourage users to add to this documentation.
25
25
26
26
This is a great *First Pull Request * (to add interesting links and/or put short code inline
@@ -45,9 +45,13 @@ These are some neat pandas ``idioms``
45
45
`How to select from a frame with complex criteria?
46
46
<http://stackoverflow.com/questions/15315452/selecting-with-complex-criteria-from-pandas-dataframe> `__
47
47
48
- `Select rows closest to a user defined numer
48
+ `Select rows closest to a user- defined number
49
49
<http://stackoverflow.com/questions/17758023/return-rows-in-a-dataframe-closest-to-a-user-defined-number> `__
50
50
51
+ `How to reduce a sequence (e.g. of Series) using a binary operator
52
+ <http://stackoverflow.com/questions/21058254/pandas-boolean-operation-in-a-python-list/21058331> `__
53
+
54
+
51
55
.. _cookbook.selection :
52
56
53
57
Selection
@@ -90,7 +94,7 @@ The :ref:`multindexing <indexing.hierarchical>` docs.
90
94
Arithmetic
91
95
~~~~~~~~~~
92
96
93
- `Performing arithmetic with a multi-index that needs broadcastin
97
+ `Performing arithmetic with a multi-index that needs broadcasting
94
98
<http://stackoverflow.com/questions/19501510/divide-entire-pandas-multiindex-dataframe-by-dataframe-variable/19502176#19502176> `__
95
99
96
100
Slicing
@@ -221,7 +225,7 @@ The :ref:`Pivot <reshaping.pivot>` docs.
221
225
Apply
222
226
~~~~~
223
227
224
- `Turning embeded lists into a multi-index frame
228
+ `Turning embedded lists into a multi-index frame
225
229
<http://stackoverflow.com/questions/17349981/converting-pandas-dataframe-with-categorical-values-into-binary-values> `__
226
230
227
231
`Rolling apply with a DataFrame returning a Series
@@ -242,8 +246,8 @@ Timeseries
242
246
`Vectorized Lookup
243
247
<http://stackoverflow.com/questions/13893227/vectorized-look-up-of-values-in-pandas-dataframe> `__
244
248
245
- Turn a matrix with hours in columns and days in rows into a continous row sequence in the form of a time series.
246
- `How to rearrange a python pandas dataframe ?
249
+ Turn a matrix with hours in columns and days in rows into a continuous row sequence in the form of a time series.
250
+ `How to rearrange a python pandas DataFrame ?
247
251
<http://stackoverflow.com/questions/15432659/how-to-rearrange-a-python-pandas-dataframe> `__
248
252
249
253
.. _cookbook.resample :
@@ -354,7 +358,7 @@ The :ref:`CSV <io.read_csv_table>` docs
354
358
`Reading the first few lines of a frame
355
359
<http://stackoverflow.com/questions/15008970/way-to-read-first-few-lines-for-pandas-dataframe> `__
356
360
357
- Reading a file that is compressed but not by ``gzip/bz2 `` (the native compresed formats which ``read_csv `` understands).
361
+ Reading a file that is compressed but not by ``gzip/bz2 `` (the native compressed formats which ``read_csv `` understands).
358
362
This example shows a ``WinZipped `` file, but is a general application of opening the file within a context manager and
359
363
using that handle to read.
360
364
`See here
@@ -410,13 +414,13 @@ The :ref:`HDFStores <io.hdf5>` docs
410
414
`Simple Queries with a Timestamp Index
411
415
<http://stackoverflow.com/questions/13926089/selecting-columns-from-pandas-hdfstore-table> `__
412
416
413
- `Managing heteregenous data using a linked multiple table hierarchy
417
+ `Managing heterogeneous data using a linked multiple table hierarchy
414
418
<http://github.com/pydata/pandas/issues/3032> `__
415
419
416
420
`Merging on-disk tables with millions of rows
417
421
<http://stackoverflow.com/questions/14614512/merging-two-tables-with-millions-of-rows-in-python/14617925#14617925> `__
418
422
419
- Deduplicating a large store by chunks, essentially a recusive reduction operation. Shows a function for taking in data from
423
+ Deduplicating a large store by chunks, essentially a recursive reduction operation. Shows a function for taking in data from
420
424
csv file and creating a store by chunks, with date parsing as well.
421
425
`See here
422
426
<http://stackoverflow.com/questions/16110252/need-to-compare-very-large-files-around-1-5gb-in-python/16110391#16110391> `__
0 commit comments