Skip to content

Commit 0322852

Browse files
jrebackjeffreystarr
authored andcommitted
DOC: v0.14.0 updates
1 parent 74b796f commit 0322852

File tree

3 files changed

+74
-54
lines changed

3 files changed

+74
-54
lines changed

doc/source/release.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ API Changes
166166

167167
- Added ``nunique`` and ``value_counts`` functions to ``Index`` for counting unique elements. (:issue:`6734`)
168168

169-
- ``DataFrame.plot`` and ``Series.plot`` now support a ``table`` keyword for plotting ``matplotlib.Table``. The ``table`` kewyword can receive the following values.
170-
169+
- ``DataFrame.plot`` and ``Series.plot`` now support a ``table`` keyword for plotting ``matplotlib.Table``. The ``table`` kewyword can receive the following values.
170+
171171
- ``False``: Do nothing (default).
172172

173173
- ``True``: Draw a table using the ``DataFrame`` or ``Series`` called ``plot`` method. Data will be transposed to meet matplotlib's default layout.
174-
174+
175175
- ``DataFrame`` or ``Series``: Draw matplotlib.table using the passed data. The data will be drawn as displayed in print method (not transposed automatically).
176176

177177
Also, helper function ``pandas.tools.plotting.table`` is added to create a table from ``DataFrame`` and ``Series``, and add it to an ``matplotlib.Axes``.

doc/source/v0.14.0.txt

+45-33
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,25 @@ This is a major release from 0.13.1 and includes a small number of API changes,
77
enhancements, and performance improvements along with a large number of bug fixes. We recommend that all
88
users upgrade to this version.
99

10-
Highlights include:
10+
- Highlights include:
1111

12-
- MultIndexing Using Slicers
13-
- Joining a singly-indexed DataFrame with a multi-indexed DataFrame
14-
- More consistency in groupby results and more flexible groupby specifications
12+
- SQL interfaces updated to use ``sqlalchemy``, See :ref:`Here<whatsnew_0140.sql>`.
13+
- MultiIndexing Using Slicers, See :ref:`Here<whatsnew_0140.slicers>`.
14+
- Ability to join a singly-indexed DataFrame with a multi-indexed DataFrame, see :ref:`Here <merging.join_on_mi>`
15+
- More consistency in groupby results and more flexible groupby specifications, see :ref:`Here <groupby.specify>`
16+
- Holiday calendars are now supported in ``CustomBusinessDay``, see :ref:`Here <timeseries.holiday>`
17+
- Updated plotting options, See :ref:`Here<whatsnew_0140.plotting>`.
18+
- Performance doc section on I/O operations, See :ref:`Here <io.perf>`
19+
20+
- :ref:`Other Enhancements <whatsnew_0140.enhancements>`
21+
22+
- :ref:`API Changes <whatsnew_0140.api>`
23+
24+
- :ref:`Deprecations <whatsnew_0140.deprecations>`
25+
26+
- :ref:`Bug Fixes <release.bug_fixes-0.14.0>`
27+
28+
.. _whatsnew_0140.api:
1529

1630
API changes
1731
~~~~~~~~~~~
@@ -173,16 +187,6 @@ API changes
173187
# New output, 4-level MultiIndex
174188
df_multi.set_index([df_multi.index, df_multi.index])
175189

176-
- Following keywords are now acceptable for :meth:`DataFrame.plot(kind='bar')` and :meth:`DataFrame.plot(kind='barh')`.
177-
178-
- `width`: Specify the bar width. In previous versions, static value 0.5 was passed to matplotlib and it cannot be overwritten. (:issue:`6604`)
179-
180-
- `align`: Specify the bar alignment. Default is `center` (different from matplotlib). In previous versions, pandas passes `align='edge'` to matplotlib and adjust the location to `center` by itself, and it results `align` keyword is not applied as expected. (:issue:`4525`)
181-
182-
- `position`: Specify relative alignments for bar plot layout. From 0 (left/bottom-end) to 1(right/top-end). Default is 0.5 (center). (:issue:`6604`)
183-
184-
Because of the default `align` value changes, coordinates of bar plots are now located on integer values (0.0, 1.0, 2.0 ...). This is intended to make bar plot be located on the same coodinates as line plot. However, bar plot may differs unexpectedly when you manually adjust the bar location or drawing area, such as using `set_xlim`, `set_ylim`, etc. In this cases, please modify your script to meet with new coordinates.
185-
186190
- ``pairwise`` keyword was added to the statistical moment functions
187191
``rolling_cov``, ``rolling_corr``, ``ewmcov``, ``ewmcorr``,
188192
``expanding_cov``, ``expanding_corr`` to allow the calculation of moving
@@ -201,16 +205,13 @@ API changes
201205
- ``Series.iteritems()`` is now lazy (returns an iterator rather than a list). This was the documented behavior prior to 0.14. (:issue:`6760`)
202206

203207

204-
- ``DataFrame.plot`` and ``Series.plot`` now support a ``table`` keyword for plotting ``matplotlib.Table``. The ``table`` kewyword can receive the following values.
205-
206-
- ``False``: Do nothing (default).
207208

208-
- ``True``: Draw a table using the ``DataFrame`` or ``Series`` called ``plot`` method. Data will be transposed to meet matplotlib's default layout.
209-
210-
- ``DataFrame`` or ``Series``: Draw matplotlib.table using the passed data. The data will be drawn as displayed in print method (not transposed automatically).
209+
.. _whatsnew_0140.sql:
211210

212-
Also, helper function ``pandas.tools.plotting.table`` is added to create a table from ``DataFrame`` and ``Series``, and add it to an ``matplotlib.Axes``.
211+
SQL
212+
~~~
213213

214+
.. _whatsnew_0140.slicers:
214215

215216
MultiIndexing Using Slicers
216217
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -319,19 +320,29 @@ You can use a right-hand-side of an alignable object as well.
319320
df2.loc[idx[:,:,['C1','C3']],:] = df2*1000
320321
df2
321322

322-
Plotting With Errorbars
323-
~~~~~~~~~~~~~~~~~~~~~~~
323+
.. _whatsnew_0140.plotting:
324324

325-
Plotting with error bars is now supported in the ``.plot`` method of ``DataFrame`` and ``Series`` objects (:issue:`3796`).
325+
Plotting
326+
~~~~~~~~
326327

327-
x and y errorbars are supported and can be supplied using the ``xerr`` and ``yerr`` keyword arguments to ``.plot()`` The error values can be specified using a variety of formats.
328+
- Hexagonal bin plots from ``DataFrame.plot`` with ``kind='hexbin'`` (:issue:`5478`), See :ref:`the docs<visualization.hexbin>`.
328329

329-
- As a ``DataFrame`` or ``dict`` of errors with one or more of the column names (or dictionary keys) matching one or more of the column names of the plotting ``DataFrame`` or matching the ``name`` attribute of the ``Series``
330-
- As a ``str`` indicating which of the columns of plotting ``DataFrame`` contain the error values
331-
- As raw values (``list``, ``tuple``, or ``np.ndarray``). Must be the same length as the plotting ``DataFrame``/``Series``
330+
- Plotting with Error Bars is now supported in the ``.plot`` method of ``DataFrame`` and ``Series`` objects (:issue:`3796`), See :ref:`the docs<visualization.errorbars>`.
332331

333-
Asymmetrical error bars are also supported, however raw error values must be provided in this case. For a ``M`` length ``Series``, a ``Mx2`` array should be provided indicating lower and upper (or left and right) errors. For a ``MxN`` ``DataFrame``, asymmetrical errors should be in a ``Mx2xN`` array.
332+
- ``DataFrame.plot`` and ``Series.plot`` now support a ``table`` keyword for plotting ``matplotlib.Table``, See :ref:`the docs<visualization.table>`.
334333

334+
- ``plot(legend='reverse')`` will now reverse the order of legend labels for
335+
most plot kinds. (:issue:`6014`)
336+
337+
- Following keywords are now acceptable for :meth:`DataFrame.plot(kind='bar')` and :meth:`DataFrame.plot(kind='barh')`.
338+
339+
- `width`: Specify the bar width. In previous versions, static value 0.5 was passed to matplotlib and it cannot be overwritten. (:issue:`6604`)
340+
341+
- `align`: Specify the bar alignment. Default is `center` (different from matplotlib). In previous versions, pandas passes `align='edge'` to matplotlib and adjust the location to `center` by itself, and it results `align` keyword is not applied as expected. (:issue:`4525`)
342+
343+
- `position`: Specify relative alignments for bar plot layout. From 0 (left/bottom-end) to 1(right/top-end). Default is 0.5 (center). (:issue:`6604`)
344+
345+
Because of the default `align` value changes, coordinates of bar plots are now located on integer values (0.0, 1.0, 2.0 ...). This is intended to make bar plot be located on the same coodinates as line plot. However, bar plot may differs unexpectedly when you manually adjust the bar location or drawing area, such as using `set_xlim`, `set_ylim`, etc. In this cases, please modify your script to meet with new coordinates.
335346

336347
Prior Version Deprecations/Changes
337348
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -340,6 +351,8 @@ There are prior version deprecations that are taking effect as of 0.14.0.
340351

341352
- Remove ``column`` keyword from ``DataFrame.sort`` (:issue:`4370`)
342353

354+
.. _whatsnew_0140.deprecations:
355+
343356
Deprecations
344357
~~~~~~~~~~~~
345358

@@ -358,15 +371,14 @@ Deprecations
358371
``FutureWarning`` is raised to alert that the old ``cols`` arguments
359372
will not be supported in a future release (:issue:`6645`)
360373

374+
.. _whatsnew_0140.enhancements:
375+
361376
Enhancements
362377
~~~~~~~~~~~~
363378

364379
- ``DataFrame.to_latex`` now takes a longtable keyword, which if True will return a table in a longtable environment. (:issue:`6617`)
365380
- ``pd.read_clipboard`` will, if 'sep' is unspecified, try to detect data copied from a spreadsheet
366381
and parse accordingly. (:issue:`6223`)
367-
- ``plot(legend='reverse')`` will now reverse the order of legend labels for
368-
most plot kinds. (:issue:`6014`)
369-
- Hexagonal bin plots from ``DataFrame.plot`` with ``kind='hexbin'`` (:issue:`5478`)
370382
- Joining a singly-indexed DataFrame with a multi-indexed DataFrame (:issue:`3662`)
371383

372384
See :ref:`the docs<merging.join_on_mi>`. Joining multi-index DataFrames on both the left and right is not yet supported ATM.
@@ -403,7 +415,7 @@ Enhancements
403415
file. (:issue:`6545`)
404416
- ``pandas.io.gbq`` now handles reading unicode strings properly. (:issue:`5940`)
405417
- Improve performance of ``CustomBusinessDay`` (:issue:`6584`)
406-
- :ref:`Holidays and holiday calendars<timeseries.holiday>` are now available and can be used with CustomBusinessDay (:issue:`6719`)
418+
- :ref:`Holidays Calendars<timeseries.holiday>` are now available and can be used with CustomBusinessDay (:issue:`6719`)
407419

408420
Performance
409421
~~~~~~~~~~~

doc/source/visualization.rst

+26-18
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ columns:
385385

386386
Plotting With Error Bars
387387
~~~~~~~~~~~~~~~~~~~~~~~~
388+
389+
.. versionadded:: 0.14
390+
388391
Plotting with error bars is now supported in the ``.plot`` method of ``DataFrame`` and ``Series`` objects.
389392

390393
x and y errorbars are supported and be supplied using the ``xerr`` and ``yerr`` keyword arguments to ``.plot()`` The error values can be specified using a variety of formats.
@@ -415,6 +418,8 @@ Here is an example of one way to easily plot group means with standard deviation
415418
@savefig errorbar_example.png
416419
means.plot(yerr=errors, ax=ax, kind='bar')
417420
421+
.. _visualization.table:
422+
418423
Plotting With Table
419424
~~~~~~~~~~~~~~~~~~~~~~~~
420425

@@ -448,7 +453,7 @@ Finally, there is a helper function ``pandas.tools.plotting.table`` to create a
448453
from pandas.tools.plotting import table
449454
fig, ax = plt.subplots(1, 1)
450455
451-
table(ax, np.round(df.describe(), 2),
456+
table(ax, np.round(df.describe(), 2),
452457
loc='upper right', colWidths=[0.2, 0.2, 0.2])
453458
454459
@savefig line_plot_table_describe.png
@@ -494,7 +499,10 @@ setting ``kind='kde'``:
494499

495500
Hexagonal Bin plot
496501
~~~~~~~~~~~~~~~~~~
497-
*New in .14* You can create hexagonal bin plots with ``DataFrame.plot`` and
502+
503+
.. versionadded:: 0.14
504+
505+
You can create hexagonal bin plots with ``DataFrame.plot`` and
498506
``kind='hexbin'``.
499507
Hexbin plots can be a useful alternative to scatter plots if your data are
500508
too dense to plot each point individually.
@@ -693,17 +701,17 @@ be colored differently.
693701
Colormaps
694702
~~~~~~~~~
695703

696-
A potential issue when plotting a large number of columns is that it can be
704+
A potential issue when plotting a large number of columns is that it can be
697705
difficult to distinguish some series due to repetition in the default colors. To
698-
remedy this, DataFrame plotting supports the use of the ``colormap=`` argument,
699-
which accepts either a Matplotlib `colormap <http://matplotlib.org/api/cm_api.html>`__
700-
or a string that is a name of a colormap registered with Matplotlib. A
701-
visualization of the default matplotlib colormaps is available `here
706+
remedy this, DataFrame plotting supports the use of the ``colormap=`` argument,
707+
which accepts either a Matplotlib `colormap <http://matplotlib.org/api/cm_api.html>`__
708+
or a string that is a name of a colormap registered with Matplotlib. A
709+
visualization of the default matplotlib colormaps is available `here
702710
<http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps>`__.
703711

704-
As matplotlib does not directly support colormaps for line-based plots, the
712+
As matplotlib does not directly support colormaps for line-based plots, the
705713
colors are selected based on an even spacing determined by the number of columns
706-
in the DataFrame. There is no consideration made for background color, so some
714+
in the DataFrame. There is no consideration made for background color, so some
707715
colormaps will produce lines that are not easily visible.
708716

709717
To use the jet colormap, we can simply pass ``'jet'`` to ``colormap=``
@@ -762,16 +770,16 @@ Andrews curves charts:
762770
Plotting directly with matplotlib
763771
---------------------------------
764772

765-
In some situations it may still be preferable or necessary to prepare plots
766-
directly with matplotlib, for instance when a certain type of plot or
767-
customization is not (yet) supported by pandas. Series and DataFrame objects
768-
behave like arrays and can therefore be passed directly to matplotlib functions
773+
In some situations it may still be preferable or necessary to prepare plots
774+
directly with matplotlib, for instance when a certain type of plot or
775+
customization is not (yet) supported by pandas. Series and DataFrame objects
776+
behave like arrays and can therefore be passed directly to matplotlib functions
769777
without explicit casts.
770778

771-
Pandas also automatically registers formatters and locators that recognize date
772-
indices, thereby extending date and time support to practically all plot types
773-
available in matplotlib. Although this formatting does not provide the same
774-
level of refinement you would get when plotting via pandas, it can be faster
779+
Pandas also automatically registers formatters and locators that recognize date
780+
indices, thereby extending date and time support to practically all plot types
781+
available in matplotlib. Although this formatting does not provide the same
782+
level of refinement you would get when plotting via pandas, it can be faster
775783
when plotting a large number of points.
776784

777785
.. note::
@@ -781,7 +789,7 @@ when plotting a large number of points.
781789

782790
.. ipython:: python
783791
784-
price = Series(randn(150).cumsum(),
792+
price = Series(randn(150).cumsum(),
785793
index=date_range('2000-1-1', periods=150, freq='B'))
786794
ma = pd.rolling_mean(price, 20)
787795
mstd = pd.rolling_std(price, 20)

0 commit comments

Comments
 (0)