Skip to content

DOC: Fixup docstring [ci skip] #21663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/merging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ You can also pass a list of dicts or Series:

dicts = [{'A': 1, 'B': 2, 'C': 3, 'X': 4},
{'A': 5, 'B': 6, 'C': 7, 'Y': 8}]
result = df1.append(dicts, ignore_index=True)
result = df1.append(dicts, ignore_index=True, sort=False)

.. ipython:: python
:suppress:
Expand Down
15 changes: 8 additions & 7 deletions doc/source/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,13 @@ For concatenation with a ``Series`` or ``DataFrame``, it is possible to align th
the ``join``-keyword.

.. ipython:: python
:okwarning:

u = pd.Series(['b', 'd', 'a', 'c'], index=[1, 3, 0, 2])
s
u
s.str.cat(u)
s.str.cat(u, join='left')
u = pd.Series(['b', 'd', 'a', 'c'], index=[1, 3, 0, 2])
s
u
s.str.cat(u)
s.str.cat(u, join='left')

.. warning::

Expand All @@ -296,7 +297,7 @@ In particular, alignment also means that the different lengths do not need to co
The same alignment can be used when ``others`` is a ``DataFrame``:

.. ipython:: python

f = d.loc[[3, 2, 1, 0], :]
s
f
Expand All @@ -311,7 +312,7 @@ All one-dimensional list-likes can be arbitrarily combined in a list-like contai

s
u
s.str.cat([u, pd.Index(u.values), ['A', 'B', 'C', 'D'], map(str, u.index)], na_rep='-')
s.str.cat([u, u.values, ['A', 'B', 'C', 'D'], map(str, u.index)], na_rep='-')

All elements must match in length to the calling ``Series`` (or ``Index``), except those having an index if ``join`` is not None:

Expand Down
7 changes: 1 addition & 6 deletions doc/source/whatsnew/v0.10.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,17 +281,12 @@ The old behavior of printing out summary information can be achieved via the

The width of each line can be changed via 'line_width' (80 by default):

.. ipython:: python
.. code-block:: python

pd.set_option('line_width', 40)

wide_frame

.. ipython:: python
:suppress:

pd.reset_option('line_width')


Updated PyTables Support
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 1 addition & 2 deletions doc/source/whatsnew/v0.13.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ API changes
equal. NaNs in identical locations are treated as
equal. (:issue:`5283`) See also :ref:`the docs<basics.equals>` for a motivating example.

.. ipython:: python
:okwarning:
.. code-block:: python

df = DataFrame({'col':['foo', 0, np.nan]})
df2 = DataFrame({'col':[np.nan, 0, 'foo']}, index=[2,1,0])
Expand Down
12 changes: 6 additions & 6 deletions doc/source/whatsnew/v0.14.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ Enhancements
``offsets.apply``, ``rollforward`` and ``rollback`` resets the time (hour,
minute, etc) or not (default ``False``, preserves time) (:issue:`7156`):

.. ipython:: python
.. code-block:: python

import pandas.tseries.offsets as offsets
import pandas.tseries.offsets as offsets

day = offsets.Day()
day.apply(Timestamp('2014-01-01 09:00'))
day = offsets.Day()
day.apply(Timestamp('2014-01-01 09:00'))

day = offsets.Day(normalize=True)
day.apply(Timestamp('2014-01-01 09:00'))
day = offsets.Day(normalize=True)
day.apply(Timestamp('2014-01-01 09:00'))

- ``PeriodIndex`` is represented as the same format as ``DatetimeIndex`` (:issue:`7601`)
- ``StringMethods`` now work on empty Series (:issue:`7242`)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.15.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ Other:
business_dates = date_range(start='4/1/2014', end='6/30/2014', freq='B')
df = DataFrame(1, index=business_dates, columns=['a', 'b'])
# get the first, 4th, and last date index for each month
df.groupby((df.index.year, df.index.month)).nth([0, 3, -1])
df.groupby([df.index.year, df.index.month]).nth([0, 3, -1])

- ``Period`` and ``PeriodIndex`` supports addition/subtraction with ``timedelta``-likes (:issue:`7966`)

Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.17.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ We can render the HTML to get the following table.
:file: whatsnew_0171_html_table.html

:class:`~pandas.core.style.Styler` interacts nicely with the Jupyter Notebook.
See the :doc:`documentation <style>` for more.
See the :ref:`documentation </style.ipynb>` for more.

.. _whatsnew_0171.enhancements:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Timezones
^^^^^^^^^

- Bug in :meth:`DatetimeIndex.shift` where an ``AssertionError`` would raise when shifting across DST (:issue:`8616`)
- Bug in :class:`Timestamp` constructor where passing an invalid timezone offset designator (``Z``) would not raise a ``ValueError``(:issue:`8910`)
- Bug in :class:`Timestamp` constructor where passing an invalid timezone offset designator (``Z``) would not raise a ``ValueError`` (:issue:`8910`)
- Bug in :meth:`Timestamp.replace` where replacing at a DST boundary would retain an incorrect offset (:issue:`7825`)
- Bug in :meth:`Series.replace` with ``datetime64[ns, tz]`` data when replacing ``NaT`` (:issue:`11792`)
- Bug in :class:`Timestamp` when passing different string date formats with a timezone offset would produce different timezone offsets (:issue:`12064`)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.8.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ types. For example, ``'kde'`` is a new option:
s = Series(np.concatenate((np.random.randn(1000),
np.random.randn(1000) * 0.5 + 3)))
plt.figure()
s.hist(normed=True, alpha=0.2)
s.hist(density=True, alpha=0.2)
s.plot(kind='kde')

See :ref:`the plotting page <visualization.other>` for much more.
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ def mode(self, dropna=True):
Always returns Series even if only one value is returned.

Parameters
-------
----------
dropna : boolean, default True
Don't consider counts of NaN/NaT.

Expand Down