Skip to content

DOC: Fix summaries not ending with a period #24190

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 23 commits into from
Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
91ab671
fix Summary does not end with a period error
YuechengWu Dec 10, 2018
b366819
fixed generic.py PEP8 - line too long issues
YuechengWu Dec 10, 2018
88d6664
fixed generic.py PEP8 - trailing whitespace issues
YuechengWu Dec 10, 2018
ad50026
fixed minor errors
YuechengWu Dec 10, 2018
d3d0bd0
removed a few more \n
YuechengWu Dec 10, 2018
97444fb
added back required \n
YuechengWu Dec 10, 2018
dc0a303
Update pandas/core/arrays/datetimes.py
datapythonista Dec 10, 2018
8639841
Update pandas/core/arrays/datetimes.py
datapythonista Dec 10, 2018
b052287
fix Summary does not end with a period error
YuechengWu Dec 10, 2018
41e4757
fixed generic.py PEP8 - line too long issues
YuechengWu Dec 10, 2018
074b925
fixed generic.py PEP8 - trailing whitespace issues
YuechengWu Dec 10, 2018
a1e0df2
fixed minor errors
YuechengWu Dec 10, 2018
860bb8d
removed a few more \n
YuechengWu Dec 10, 2018
ce03033
revert back \n
YuechengWu Dec 11, 2018
b41fed4
fixing conflicts
YuechengWu Dec 11, 2018
c10e7c5
revert \n
YuechengWu Dec 11, 2018
5f67556
all my changes in a single commit
YuechengWu Dec 11, 2018
7b8d1e8
Merge branch 'issue-24164' of https://github.com/YuechengWu/pandas in…
YuechengWu Dec 11, 2018
1950b08
All my changes in a single commit
YuechengWu Dec 11, 2018
671b5bd
Merge branch 'issue-24164' of https://github.com/YuechengWu/pandas in…
YuechengWu Dec 11, 2018
18350bf
clean up branch history
YuechengWu Dec 11, 2018
aecb483
Merge branch 'master' of https://github.com/YuechengWu/pandas into is…
YuechengWu Dec 11, 2018
dad7f70
Merge branch 'issue-24164' of https://github.com/YuechengWu/pandas in…
YuechengWu Dec 11, 2018
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/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _delegate_method(self, name, *args, **kwargs):
def _add_delegate_accessors(cls, delegate, accessors, typ,
overwrite=False):
"""
add accessors to cls from the delegate class
Add accessors to cls from the delegate class.

Parameters
----------
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def categories(self, categories):
@property
def ordered(self):
"""
Whether the categories have an ordered relationship
Whether the categories have an ordered relationship.
"""
return self.dtype.ordered

Expand Down Expand Up @@ -782,7 +782,7 @@ def set_ordered(self, value, inplace=False):

def as_ordered(self, inplace=False):
"""
Sets the Categorical to be ordered
Set the Categorical to be ordered.

Parameters
----------
Expand All @@ -795,7 +795,7 @@ def as_ordered(self, inplace=False):

def as_unordered(self, inplace=False):
"""
Sets the Categorical to be unordered
Set the Categorical to be unordered.

Parameters
----------
Expand Down
22 changes: 11 additions & 11 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def f(self):
return result

f.__name__ = name
f.__doc__ = "\n{}\n".format(docstring)
f.__doc__ = "{}".format(docstring)
return property(f)


Expand Down Expand Up @@ -1065,19 +1065,19 @@ def date(self):

return tslib.ints_to_pydatetime(timestamps, box="date")

year = _field_accessor('year', 'Y', "\n The year of the datetime\n")
year = _field_accessor('year', 'Y', " The year of the datetime.")
month = _field_accessor('month', 'M',
"\n The month as January=1, December=12 \n")
day = _field_accessor('day', 'D', "\nThe days of the datetime\n")
hour = _field_accessor('hour', 'h', "\nThe hours of the datetime\n")
minute = _field_accessor('minute', 'm', "\nThe minutes of the datetime\n")
second = _field_accessor('second', 's', "\nThe seconds of the datetime\n")
" The month as January=1, December=12. ")
day = _field_accessor('day', 'D', "The days of the datetime.")
hour = _field_accessor('hour', 'h', "The hours of the datetime.")
minute = _field_accessor('minute', 'm', "The minutes of the datetime.")
second = _field_accessor('second', 's', "The seconds of the datetime.")
microsecond = _field_accessor('microsecond', 'us',
"\nThe microseconds of the datetime\n")
"The microseconds of the datetime.")
nanosecond = _field_accessor('nanosecond', 'ns',
"\nThe nanoseconds of the datetime\n")
"The nanoseconds of the datetime.")
weekofyear = _field_accessor('weekofyear', 'woy',
"\nThe week ordinal of the year\n")
"The week ordinal of the year.")
week = weekofyear
_dayofweek_doc = """
The day of the week with Monday=0, Sunday=6.
Expand Down Expand Up @@ -1119,7 +1119,7 @@ def date(self):
weekday_name = _field_accessor(
'weekday_name',
'weekday_name',
"The name of day in a week (ex: Friday)\n\n.. deprecated:: 0.23.0")
"The name of day in a week (ex: Friday).. deprecated:: 0.23.0")

dayofyear = _field_accessor('dayofyear', 'doy',
"The ordinal day of the year.")
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ def nunique(self, dropna=True):
@property
def is_unique(self):
"""
Return boolean if values in the object are unique
Return boolean if values in the object are unique.

Returns
-------
Expand All @@ -1256,7 +1256,7 @@ def is_unique(self):
def is_monotonic(self):
"""
Return boolean if values in the object are
monotonic_increasing
monotonic_increasing.

.. versionadded:: 0.19.0

Expand All @@ -1273,7 +1273,7 @@ def is_monotonic(self):
def is_monotonic_decreasing(self):
"""
Return boolean if values in the object are
monotonic_decreasing
monotonic_decreasing.

.. versionadded:: 0.19.0

Expand Down
2 changes: 1 addition & 1 deletion pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def categories(self):
@property
def ordered(self):
"""
Whether the categories have an ordered relationship
Whether the categories have an ordered relationship.
"""
return self._ordered

Expand Down
38 changes: 20 additions & 18 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def transpose(self, *args, **kwargs):

def swapaxes(self, axis1, axis2, copy=True):
"""
Interchange axes and swap values axes appropriately
Interchange axes and swap values axes appropriately.

Returns
-------
Expand Down Expand Up @@ -1907,7 +1907,7 @@ def __array_wrap__(self, result, context=None):

def to_dense(self):
"""
Return dense representation of NDFrame (as opposed to sparse)
Return dense representation of NDFrame (as opposed to sparse).
"""
# compat
return self
Expand Down Expand Up @@ -3597,7 +3597,7 @@ class animal locomotion

def select(self, crit, axis=0):
"""
Return data corresponding to axis labels matching criteria
Return data corresponding to axis labels matching criteria.

.. deprecated:: 0.21.0
Use df.loc[df.index.map(crit)] to select via labels
Expand Down Expand Up @@ -4841,7 +4841,7 @@ def sample(self, n=None, frac=None, replace=False, weights=None,
return self.take(locs, axis=axis, is_copy=False)

_shared_docs['pipe'] = (r"""
Apply func(self, \*args, \*\*kwargs)
Apply func(self, \*args, \*\*kwargs).

Parameters
----------
Expand Down Expand Up @@ -5533,7 +5533,7 @@ def as_blocks(self, copy=True):
@property
def blocks(self):
"""
Internal property, property synonym for as_blocks()
Internal property, property synonym for as_blocks().

.. deprecated:: 0.21.0
"""
Expand Down Expand Up @@ -5918,7 +5918,7 @@ def infer_objects(self):
def fillna(self, value=None, method=None, axis=None, inplace=False,
limit=None, downcast=None):
"""
Fill NA/NaN values using the specified method
Fill NA/NaN values using the specified method.

Parameters
----------
Expand Down Expand Up @@ -6103,14 +6103,16 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,

def ffill(self, axis=None, inplace=False, limit=None, downcast=None):
"""
Synonym for :meth:`DataFrame.fillna(method='ffill') <DataFrame.fillna>`
Synonym for :meth:`DataFrame.fillna(method='ffill')
<DataFrame.fillna>`.
"""
return self.fillna(method='ffill', axis=axis, inplace=inplace,
limit=limit, downcast=downcast)

def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
"""
Synonym for :meth:`DataFrame.fillna(method='bfill') <DataFrame.fillna>`
Synonym for :meth:`DataFrame.fillna(method='bfill')
<DataFrame.fillna>`.
"""
return self.fillna(method='bfill', axis=axis, inplace=inplace,
limit=limit, downcast=downcast)
Expand Down Expand Up @@ -8251,7 +8253,7 @@ def rank(self, axis=0, method='average', numeric_only=None,
na_option='keep', ascending=True, pct=False):
"""
Compute numerical data ranks (1 through n) along axis. Equal values are
assigned a rank that is the average of the ranks of those values
assigned a rank that is the average of the ranks of those values.

Parameters
----------
Expand Down Expand Up @@ -8313,7 +8315,7 @@ def ranker(data):

_shared_docs['align'] = ("""
Align two objects on their axes with the
specified join method for each axis Index
specified join method for each axis Index.

Parameters
----------
Expand Down Expand Up @@ -9902,7 +9904,7 @@ def _add_numeric_operations(cls):

@Substitution(outname='mad',
desc="Return the mean absolute deviation of the values "
"for the requested axis",
"for the requested axis.",
name1=name, name2=name2, axis_descr=axis_descr,
min_count='', examples='')
@Appender(_num_doc)
Expand Down Expand Up @@ -9944,7 +9946,7 @@ def mad(self, axis=None, skipna=None, level=None):

@Substitution(outname='compounded',
desc="Return the compound percentage of the values for "
"the requested axis", name1=name, name2=name2,
"the requested axis.", name1=name, name2=name2,
axis_descr=axis_descr,
min_count='', examples='')
@Appender(_num_doc)
Expand Down Expand Up @@ -9974,31 +9976,31 @@ def compound(self, axis=None, skipna=None, level=None):

cls.sum = _make_min_count_stat_function(
cls, 'sum', name, name2, axis_descr,
'Return the sum of the values for the requested axis',
'Return the sum of the values for the requested axis.',
nanops.nansum, _sum_examples)
cls.mean = _make_stat_function(
cls, 'mean', name, name2, axis_descr,
'Return the mean of the values for the requested axis',
'Return the mean of the values for the requested axis.',
nanops.nanmean)
cls.skew = _make_stat_function(
cls, 'skew', name, name2, axis_descr,
'Return unbiased skew over requested axis\nNormalized by N-1',
'Return unbiased skew over requested axis\nNormalized by N-1.',
nanops.nanskew)
cls.kurt = _make_stat_function(
cls, 'kurt', name, name2, axis_descr,
"Return unbiased kurtosis over requested axis using Fisher's "
"definition of\nkurtosis (kurtosis of normal == 0.0). Normalized "
"by N-1",
"by N-1.",
nanops.nankurt)
cls.kurtosis = cls.kurt
cls.prod = _make_min_count_stat_function(
cls, 'prod', name, name2, axis_descr,
'Return the product of the values for the requested axis',
'Return the product of the values for the requested axis.',
nanops.nanprod, _prod_examples)
cls.product = cls.prod
cls.median = _make_stat_function(
cls, 'median', name, name2, axis_descr,
'Return the median of the values for the requested axis',
'Return the median of the values for the requested axis.',
nanops.nanmedian)
cls.max = _make_stat_function(
cls, 'max', name, name2, axis_descr,
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class DatetimeProperties(Properties):

def to_pydatetime(self):
"""
Return the data as an array of native Python datetime objects
Return the data as an array of native Python datetime objects.

Timezone information is retained if present.

Expand Down
18 changes: 9 additions & 9 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2417,7 +2417,7 @@ def hist_series(self, by=None, ax=None, grid=True, xlabelsize=None,
xrot=None, ylabelsize=None, yrot=None, figsize=None,
bins=10, **kwds):
"""
Draw histogram of the input series using matplotlib
Draw histogram of the input series using matplotlib.

Parameters
----------
Expand Down Expand Up @@ -2706,7 +2706,7 @@ def __call__(self, *args, **kwargs):

class SeriesPlotMethods(BasePlotMethods):
"""
Series plotting accessor and method
Series plotting accessor and method.

Examples
--------
Expand Down Expand Up @@ -2739,7 +2739,7 @@ def __call__(self, kind='line', ax=None,

def line(self, **kwds):
"""
Line plot
Line plot.

Parameters
----------
Expand All @@ -2764,7 +2764,7 @@ def line(self, **kwds):

def bar(self, **kwds):
"""
Vertical bar plot
Vertical bar plot.

Parameters
----------
Expand All @@ -2780,7 +2780,7 @@ def bar(self, **kwds):

def barh(self, **kwds):
"""
Horizontal bar plot
Horizontal bar plot.

Parameters
----------
Expand All @@ -2796,7 +2796,7 @@ def barh(self, **kwds):

def box(self, **kwds):
"""
Boxplot
Boxplot.

Parameters
----------
Expand All @@ -2812,7 +2812,7 @@ def box(self, **kwds):

def hist(self, bins=10, **kwds):
"""
Histogram
Histogram.

Parameters
----------
Expand Down Expand Up @@ -2873,7 +2873,7 @@ def kde(self, bw_method=None, ind=None, **kwds):

def area(self, **kwds):
"""
Area plot
Area plot.

Parameters
----------
Expand All @@ -2889,7 +2889,7 @@ def area(self, **kwds):

def pie(self, **kwds):
"""
Pie chart
Pie chart.

Parameters
----------
Expand Down