Skip to content
6 changes: 3 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,7 @@ def to_stata(self, fname, convert_dates=None, write_index=True,

def to_feather(self, fname):
"""
write out the binary feather-format for DataFrames
Write out the binary feather-format for DataFrames.

.. versionadded:: 0.20.0

Expand Down Expand Up @@ -5839,7 +5839,7 @@ def unstack(self, level=-1, fill_value=None):
return unstack(self, level, fill_value)

_shared_docs['melt'] = ("""
"Unpivots" a DataFrame from wide format to long format, optionally
'Unpivots' a DataFrame from wide format to long format, optionally
leaving identifier variables set.

This function is useful to massage a DataFrame into a format where one
Expand Down Expand Up @@ -6045,7 +6045,7 @@ def _gotitem(self,
):
# type: (...) -> Union[Series, DataFrame]
"""
sub-classes to define
Sub-classes to define
return a sliced object

Parameters
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/groupby/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@


class GroupByMixin(object):
""" provide the groupby facilities to the mixed object """
""" Provide the groupby facilities to the mixed object. """

@staticmethod
def _dispatch(name, *args, **kwargs):
""" dispatch to apply """
""" Dispatch to apply. """

def outer(self, *args, **kwargs):
def f(x):
Expand All @@ -28,8 +28,8 @@ def f(x):

def _gotitem(self, key, ndim, subset=None):
"""
sub-classes to define
return a sliced object
Sub-classes to define
return a sliced object.

Parameters
----------
Expand Down
32 changes: 16 additions & 16 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class providing the base-class of operations.

class GroupByPlot(PandasObject):
"""
Class implementing the .plot attribute for groupby objects
Class implementing the .plot attribute for groupby objects.
"""

def __init__(self, groupby):
Expand All @@ -314,7 +314,7 @@ def f(self):
@contextmanager
def _group_selection_context(groupby):
"""
set / reset the _group_selection_context
Set / reset the _group_selection_context.
"""
groupby._set_group_selection()
yield groupby
Expand Down Expand Up @@ -377,14 +377,14 @@ def __unicode__(self):

def _assure_grouper(self):
"""
we create the grouper on instantiation
sub-classes may have a different policy
We create the grouper on instantiation
sub-classes may have a different policy.
"""
pass

@property
def groups(self):
""" dict {group name -> group labels} """
""" Dict {group name -> group labels} """
self._assure_grouper()
return self.grouper.groups

Expand All @@ -395,14 +395,14 @@ def ngroups(self):

@property
def indices(self):
""" dict {group name -> group indices} """
""" Dict {group name -> group indices} """
self._assure_grouper()
return self.grouper.indices

def _get_indices(self, names):
"""
safe get multiple indices, translate keys for
datelike to underlying repr
Safe get multiple indices, translate keys for
datelike to underlying repr.
"""

def get_converter(s):
Expand Down Expand Up @@ -450,7 +450,7 @@ def get_converter(s):
return [self.indices.get(name, []) for name in names]

def _get_index(self, name):
""" safe get index, translate keys for datelike to underlying repr """
""" Safe get index, translate keys for datelike to underlying repr ."""
return self._get_indices([name])[0]

@cache_readonly
Expand Down Expand Up @@ -1127,7 +1127,7 @@ def mean(self, *args, **kwargs):
@Appender(_doc_template)
def median(self, **kwargs):
"""
Compute median of groups, excluding missing values
Compute median of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex
"""
Expand All @@ -1148,9 +1148,9 @@ def f(x):
@Appender(_doc_template)
def std(self, ddof=1, *args, **kwargs):
"""
Compute standard deviation of groups, excluding missing values
Compute standard deviation of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex
For multiple groupings, the result index will be a MultiIndex.

Parameters
----------
Expand All @@ -1166,9 +1166,9 @@ def std(self, ddof=1, *args, **kwargs):
@Appender(_doc_template)
def var(self, ddof=1, *args, **kwargs):
"""
Compute variance of groups, excluding missing values
Compute variance of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex
For multiple groupings, the result index will be a MultiIndex.

Parameters
----------
Expand All @@ -1192,9 +1192,9 @@ def var(self, ddof=1, *args, **kwargs):
@Appender(_doc_template)
def sem(self, ddof=1):
"""
Compute standard error of the mean of groups, excluding missing values
Compute standard error of the mean of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex
For multiple groupings, the result index will be a MultiIndex.

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