Skip to content

Commit 3e55bd7

Browse files
committed
Merge pull request #3052 from jreback/cook5
DOC: more examples
2 parents aefcd68 + 8260acf commit 3e55bd7

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

doc/source/cookbook.rst

+35-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
Cookbook
2020
********
2121

22-
This is a respository for *short and sweet* example and links for useful pandas recipes.
23-
We encourage users to add to this documentation. This is a great *First Pull Request*.
22+
This is a respository for *short and sweet* examples and links for useful pandas recipes.
23+
We encourage users to add to this documentation.
24+
25+
This is a great *First Pull Request* (to add interesting links and/or put short code inline
26+
for existing links)
2427

2528
Selection
2629
---------
@@ -102,6 +105,9 @@ Timeseries
102105
`Between times
103106
<http://stackoverflow.com/questions/14539992/pandas-drop-rows-outside-of-time-range>`__
104107

108+
`Vectorized Lookup
109+
<http://stackoverflow.com/questions/13893227/vectorized-look-up-of-values-in-pandas-dataframe>`__
110+
105111
Resampling
106112
~~~~~~~~~~
107113

@@ -138,6 +144,9 @@ Plotting
138144
`Make Matplotlib look like R
139145
<http://stackoverflow.com/questions/14349055/making-matplotlib-graphs-look-like-r-by-default>`__
140146

147+
`Setting x-axis major and minor labels
148+
<http://stackoverflow.com/questions/12945971/pandas-timeseries-plot-setting-x-axis-major-and-minor-ticks-and-labels>`__
149+
141150
Data In/Out
142151
-----------
143152

@@ -150,6 +159,12 @@ CSV
150159
`Reading the first few lines of a frame
151160
<http://stackoverflow.com/questions/15008970/way-to-read-first-few-lines-for-pandas-dataframe>`__
152161

162+
SQL
163+
~~~
164+
165+
`Reading from databases with SQL
166+
<http://stackoverflow.com/questions/10065051/python-pandas-and-databases-like-mysql>`__
167+
153168
HDF5
154169
~~~~
155170

@@ -165,6 +180,24 @@ HDF5
165180
`Large Data work flows
166181
<http://stackoverflow.com/questions/14262433/large-data-work-flows-using-pandas>`__
167182

183+
Storing Attributes to a group node
184+
185+
.. ipython:: python
186+
187+
df = DataFrame(np.random.randn(8,3))
188+
store = HDFStore('test.h5')
189+
store.put('df',df)
190+
191+
# you can store an arbitrary python object via pickle
192+
store.get_storer('df').attrs.my_attribute = dict(A = 10)
193+
store.get_storer('df').attrs.my_attribute
194+
195+
.. ipython:: python
196+
:suppress:
197+
198+
store.close()
199+
os.remove('test.h5')
200+
168201
Miscellaneous
169202
-------------
170203

0 commit comments

Comments
 (0)