Skip to content

DOC: Fix grammar and formatting typos #14803

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 1 commit into from
Dec 8, 2016
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 pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ def assign(self, **kwargs):
Notes
-----
Since ``kwargs`` is a dictionary, the order of your
arguments may not be preserved. The make things predicatable,
arguments may not be preserved. To make things predicatable,
the columns are inserted in alphabetical order, at the end of
your DataFrame. Assigning multiple columns within the same
``assign`` is possible, but you cannot reference other columns
Expand Down
24 changes: 15 additions & 9 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3635,14 +3635,17 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None,
require that you also specify an `order` (int),
e.g. df.interpolate(method='polynomial', order=4).
These use the actual numerical values of the index.
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip' and 'akima' are all
wrappers around the scipy interpolation methods of similar
names. These use the actual numerical values of the index. See
the scipy documentation for more on their behavior
`here <http://docs.scipy.org/doc/scipy/reference/interpolate.html#univariate-interpolation>`__ # noqa
`and here <http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html>`__ # noqa
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip' and 'akima'
are all wrappers around the scipy interpolation methods of
similar names. These use the actual numerical values of the
index. For more information on their behavior, see the
`scipy documentation
<http://docs.scipy.org/doc/scipy/reference/interpolate.html#univariate-interpolation>`__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will give a problem with out linter (that's the reason for the "#noqa"), but can wait on travis to confirm.
A way how I have solved this in other places is to ensure there are no spaces on the line that is too long (then the linter makes an exception). So you can do:

    ... `here
    <http://docs.scipy.org/doc/scipy/reference/interpolate.html#univariate-interpolation>`__ 

and then it does not complain about the too long line (this is also how it is done in some of the 'Notes' sections below

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content wise, it maybe also nicer instead of "See the scipy documention for more on their behaviour here and here" to read "For more on their behaviour see the scipy reference and tutorial documentation" (then the difference between the two 'here's is more clear)

and `tutorial documentation
<http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html>`__
* 'from_derivatives' refers to BPoly.from_derivatives which
replaces 'piecewise_polynomial' interpolation method in scipy 0.18
replaces 'piecewise_polynomial' interpolation method in
scipy 0.18

.. versionadded:: 0.18.1

Expand All @@ -3656,7 +3659,7 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None,
* 1: fill row-by-row
limit : int, default None.
Maximum number of consecutive NaNs to fill.
limit_direction : {'forward', 'backward', 'both'}, defaults to 'forward'
limit_direction : {'forward', 'backward', 'both'}, default 'forward'
If limit is specified, consecutive NaNs will be filled in this
direction.

Expand Down Expand Up @@ -4159,6 +4162,9 @@ def resample(self, rule, how=None, axis=0, fill_method=None, closed=None,

.. versionadded:: 0.19.0

Notes
-----

To learn more about the offset strings, please see `this link
<http://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases>`__.

Expand Down Expand Up @@ -4346,7 +4352,7 @@ def rank(self, axis=0, method='average', numeric_only=None,

Parameters
----------
axis: {0 or 'index', 1 or 'columns'}, default 0
axis : {0 or 'index', 1 or 'columns'}, default 0
index to direct ranking
method : {'average', 'min', 'max', 'first', 'dense'}
* average: average rank of group
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ def wrapper(self, other):

Parameters
----------
other: Series or scalar value
other : Series or scalar value
fill_value : None or float value, default None (NaN)
Fill missing (NaN) values with this value. If both Series are
missing, the result will be missing
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2033,9 +2033,9 @@ def reorder_levels(self, order):

Parameters
----------
order: list of int representing new level order.
order : list of int representing new level order.
(reference level by number or key)
axis: where to reorder levels
axis : where to reorder levels

Returns
-------
Expand Down
5 changes: 3 additions & 2 deletions pandas/tools/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2893,8 +2893,9 @@ def hist_frame(data, column=None, by=None, grid=True, xlabelsize=None,
invisible
figsize : tuple
The size of the figure to create in inches by default
layout: (optional) a tuple (rows, columns) for the layout of the histograms
bins: integer, default 10
layout : tuple, optional
Tuple of (rows, columns) for the layout of the histograms
bins : integer, default 10
Number of histogram bins to be used
kwds : other plotting keyword arguments
To be passed to hist function
Expand Down
2 changes: 1 addition & 1 deletion pandas/tseries/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ def date_range(start=None, end=None, periods=None, freq='D', tz=None,
Frequency strings can have multiples, e.g. '5H'
tz : string or None
Time zone name for returning localized DatetimeIndex, for example
Asia/Hong_Kong
Asia/Hong_Kong
normalize : bool, default False
Normalize start/end dates to midnight before generating date range
name : str, default None
Expand Down