@@ -242,9 +242,9 @@ will exclude NAs on Series input by default:
242
242
Summarizing data: describe
243
243
~~~~~~~~~~~~~~~~~~~~~~~~~~
244
244
245
- For floating point data, there is a convenient ``describe `` function which
246
- computes a variety of summary statistics about a Series or the columns of a
247
- DataFrame (excluding NAs of course):
245
+ There is a convenient ``describe `` function which computes a variety of summary
246
+ statistics about a Series or the columns of a DataFrame (excluding NAs of
247
+ course):
248
248
249
249
.. ipython :: python
250
250
@@ -255,6 +255,16 @@ DataFrame (excluding NAs of course):
255
255
frame.ix[::2 ] = np.nan
256
256
frame.describe()
257
257
258
+ For a non-numerical Series object, `describe ` will give a simple summary of the
259
+ number of unique values and most frequently occurring values:
260
+
261
+
262
+ .. ipython :: python
263
+
264
+ s = Series([' a' , ' a' , ' b' , ' b' , ' a' , ' a' , np.nan, ' c' , ' d' , ' a' ])
265
+ s.describe()
266
+
267
+
258
268
Correlations between objects
259
269
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
260
270
@@ -657,15 +667,28 @@ alternately passing the ``dtype`` keyword argument to the object constructor.
657
667
Pickling and serialization
658
668
--------------------------
659
669
660
- All pandas objects are equipped with ``save `` and ``load `` methods which use
661
- Python's ``cPickle `` module to save and load data structures to disk using the
662
- pickle format.
670
+ All pandas objects are equipped with ``save `` methods which use Python's
671
+ ``cPickle `` module to save data structures to disk using the pickle format.
663
672
664
673
.. ipython :: python
665
674
666
675
df
667
676
df.save(' foo.pickle' )
668
- DataFrame.load(' foo.pickle' )
677
+
678
+ The ``load `` function in the ``pandas `` namespace can be used to load any
679
+ pickled pandas object (or any other pickled object) from file:
680
+
681
+
682
+ .. ipython :: python
683
+
684
+ load(' foo.pickle' )
685
+
686
+ There is also a ``save `` function which takes any object as its first argument:
687
+
688
+ .. ipython :: python
689
+
690
+ save(df, ' foo.pickle' )
691
+ load(' foo.pickle' )
669
692
670
693
.. ipython :: python
671
694
:suppress:
0 commit comments