diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index a010cbf76cf5d..7b7f5f2e34c5f 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -648,7 +648,7 @@ class NaTType(_NaT): minute : int, optional second : int, optional microsecond : int, optional - nanosecond: int, optional + nanosecond : int, optional tzinfo : tz-convertible, optional fold : int, optional, default is 0 added in 3.6, NotImplemented diff --git a/pandas/_libs/tslibs/period.pyx b/pandas/_libs/tslibs/period.pyx index d651e75674239..e02e493c32a00 100644 --- a/pandas/_libs/tslibs/period.pyx +++ b/pandas/_libs/tslibs/period.pyx @@ -1777,7 +1777,7 @@ cdef class _Period(object): freq : string or DateOffset Target frequency. Default is 'D' if self.freq is week or longer and 'S' otherwise - how: str, default 'S' (start) + how : str, default 'S' (start) 'S', 'E'. Can be aliased as case insensitive 'Start', 'Finish', 'Begin', 'End' diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 457f5003cb9a5..eaaa170a387e9 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1155,7 +1155,7 @@ class Timestamp(_Timestamp): minute : int, optional second : int, optional microsecond : int, optional - nanosecond: int, optional + nanosecond : int, optional tzinfo : tz-convertible, optional fold : int, optional, default is 0 added in 3.6, NotImplemented diff --git a/pandas/compat/pickle_compat.py b/pandas/compat/pickle_compat.py index 5ac8753c3a2d5..61295b8249f58 100644 --- a/pandas/compat/pickle_compat.py +++ b/pandas/compat/pickle_compat.py @@ -210,10 +210,10 @@ def load(fh, encoding=None, compat=False, is_verbose=False): Parameters ---------- - fh: a filelike object - encoding: an optional encoding - compat: provide Series compatibility mode, boolean, default False - is_verbose: show exception output + fh : a filelike object + encoding : an optional encoding + compat : provide Series compatibility mode, boolean, default False + is_verbose : show exception output """ try: diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index df2da26685a16..7c89b8b216106 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -387,8 +387,8 @@ def isin(comps, values): Parameters ---------- - comps: array-like - values: array-like + comps : array-like + values : array-like Returns ------- @@ -856,8 +856,8 @@ def rank(values, axis=0, method='average', na_option='keep', The method by which tiebreaks are broken during the ranking. na_option : {'keep', 'top'}, default 'keep' The method by which NaNs are placed in the ranking. - - ``keep``: rank each NaN value with a NaN ranking - - ``top``: replace each NaN with either +/- inf so that they + - ``keep`` : rank each NaN value with a NaN ranking + - ``top`` : replace each NaN with either +/- inf so that they there are ranked at the top ascending : boolean, default True Whether or not the elements should be ranked in ascending order. @@ -1473,10 +1473,10 @@ def take(arr, indices, axis=0, allow_fill=False, fill_value=None): allow_fill : bool, default False How to handle negative values in `indices`. - * False: negative values in `indices` indicate positional indices + * False : negative values in `indices` indicate positional indices from the right (the default). This is similar to :func:`numpy.take`. - * True: negative values in `indices` indicate + * True : negative values in `indices` indicate missing values. These values are set to `fill_value`. Any other other negative values raise a ``ValueError``. diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 7c08644aba68f..bfb55a171c99d 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -925,7 +925,7 @@ def to_perioddelta(self, freq): Parameters ---------- - freq: Period frequency + freq : Period frequency Returns ------- diff --git a/pandas/core/dtypes/concat.py b/pandas/core/dtypes/concat.py index ebfb41825ae0a..f482f7e1927b7 100644 --- a/pandas/core/dtypes/concat.py +++ b/pandas/core/dtypes/concat.py @@ -231,7 +231,7 @@ def union_categoricals(to_union, sort_categories=False, ignore_order=False): sort_categories : boolean, default False If true, resulting categories will be lexsorted, otherwise they will be ordered as they appear in the data. - ignore_order: boolean, default False + ignore_order : boolean, default False If true, the ordered attribute of the Categoricals will be ignored. Results in an unordered categorical. diff --git a/pandas/core/frame.py b/pandas/core/frame.py index e313e0f37a445..e83c97d9785b3 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1689,7 +1689,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True, tupleize_cols : boolean, default False write multi_index columns as a list of tuples (if True) or new (expanded format) if False) - infer_datetime_format: boolean, default False + infer_datetime_format : boolean, default False If True and `parse_dates` is True for a column, try to infer the datetime format based on the first datetime string. If the format can be inferred, there often will be a large parsing speed-up. diff --git a/pandas/core/generic.py b/pandas/core/generic.py index a1d60c493dda0..acabc3b34a418 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1482,14 +1482,14 @@ def _is_level_reference(self, key, axis=0): Parameters ---------- - key: str + key : str Potential level name for the given axis - axis: int, default 0 + axis : int, default 0 Axis that levels are associated with (0 for index, 1 for columns) Returns ------- - is_level: bool + is_level : bool """ axis = self._get_axis_number(axis) @@ -4871,7 +4871,7 @@ def as_matrix(self, columns=None): Parameters ---------- - columns: list, optional, default:None + columns : list, optional, default:None If None, return all columns, otherwise, returns specified columns. Returns @@ -7307,7 +7307,7 @@ def asfreq(self, freq, method=None, how=None, normalize=False, For PeriodIndex only, see PeriodIndex.asfreq normalize : bool, default False Whether to reset output index to midnight - fill_value: scalar, optional + fill_value : scalar, optional Value to use for missing values, applied during upsampling (note this does not fill NaNs that already were present). diff --git a/pandas/core/indexes/timedeltas.py b/pandas/core/indexes/timedeltas.py index 9f9d8b1b67171..4a0d1231444dc 100644 --- a/pandas/core/indexes/timedeltas.py +++ b/pandas/core/indexes/timedeltas.py @@ -41,7 +41,7 @@ class TimedeltaIndex(TimedeltaArray, DatetimeIndexOpsMixin, ---------- data : array-like (1-dimensional), optional Optional timedelta-like data to construct index with - unit: unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional + unit : unit of the arg (D,h,m,s,ms,us,ns) denote the unit, optional which is an integer/float number freq : string or pandas offset object, optional One of pandas date offset strings or corresponding objects. The string diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 0a275c7a3575b..a23d50098e3b3 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -725,7 +725,7 @@ def asfreq(self, fill_value=None): Parameters ---------- - fill_value: scalar, optional + fill_value : scalar, optional Value to use for missing values, applied during upsampling (note this does not fill NaNs that already were present). diff --git a/pandas/core/series.py b/pandas/core/series.py index 8fba3030be9d4..58edb189b7aa1 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -77,7 +77,7 @@ def remove_na(arr): """Remove null values from array like structure. - .. deprecated:: 0.21.0 + .. deprecated :: 0.21.0 Use s[s.notnull()] instead. """ @@ -1235,7 +1235,7 @@ def to_string(self, buf=None, na_rep='NaN', float_format=None, header=True, float_format : one-parameter function, optional formatter function to apply to columns' elements if they are floats default None - header: boolean, default True + header : boolean, default True Add the Series header (index name) index : bool, optional Add index (row) labels, default True @@ -3876,7 +3876,7 @@ def from_csv(cls, path, sep=',', parse_dates=True, header=None, encoding : string, optional a string representing the encoding to use if the contents are non-ascii, for python versions prior to 3 - infer_datetime_format: boolean, default False + infer_datetime_format : boolean, default False If True and `parse_dates` is True for a column, try to infer the datetime format based on the first datetime string. If the format can be inferred, there often will be a large parsing speed-up. diff --git a/pandas/io/excel.py b/pandas/io/excel.py index 141d2c79a1927..fffa2f033cbf9 100644 --- a/pandas/io/excel.py +++ b/pandas/io/excel.py @@ -122,7 +122,7 @@ .. versionadded:: 0.20.0 -engine: string, default None +engine : string, default None If io is not a buffer or path, this must be set to identify io. Acceptable values are None or xlrd converters : dict, default None @@ -368,7 +368,7 @@ class ExcelFile(object): io : string, path object (pathlib.Path or py._path.local.LocalPath), file-like object or xlrd workbook If a string or path object, expected to be a path to xls or xlsx file - engine: string, default None + engine : string, default None If io is not a buffer or path, this must be set to identify io. Acceptable values are None or xlrd """ @@ -1011,8 +1011,8 @@ def write_cells(self, cells, sheet_name=None, startrow=0, startcol=0, cell of formatted data to save to Excel sheet sheet_name : string, default None Name of Excel sheet, if None, then use self.cur_sheet - startrow: upper left cell row to dump data frame - startcol: upper left cell column to dump data frame + startrow : upper left cell row to dump data frame + startcol : upper left cell column to dump data frame freeze_panes: integer tuple of length 2 contains the bottom-most row and right-most column to freeze """ @@ -1159,7 +1159,7 @@ def _convert_to_style(cls, style_dict): converts a style_dict to an openpyxl style object Parameters ---------- - style_dict: style dictionary to convert + style_dict : style dictionary to convert """ from openpyxl.style import Style @@ -1652,15 +1652,15 @@ def _style_to_xlwt(cls, item, firstlevel=True, field_sep=',', for example: hstyle = {"font": {"bold": True}, - "border": {"top": "thin", - "right": "thin", - "bottom": "thin", - "left": "thin"}, - "align": {"horiz": "center"}} + "border" : {"top": "thin", + "right": "thin", + "bottom": "thin", + "left": "thin"}, + "align" : {"horiz": "center"}} will be converted to - font: bold on; \ - border: top thin, right thin, bottom thin, left thin; \ - align: horiz center; + font : bold on; \ + border : top thin, right thin, bottom thin, left thin; \ + align : horiz center; """ if hasattr(item, 'items'): if firstlevel: @@ -1687,8 +1687,8 @@ def _convert_to_style(cls, style_dict, num_format_str=None): converts a style_dict to an xlwt style object Parameters ---------- - style_dict: style dictionary to convert - num_format_str: optional number format string + style_dict : style dictionary to convert + num_format_str : optional number format string """ import xlwt @@ -1790,8 +1790,8 @@ def convert(cls, style_dict, num_format_str=None): Parameters ---------- - style_dict: style dictionary to convert - num_format_str: optional number format string + style_dict : style dictionary to convert + num_format_str : optional number format string """ # Create a XlsxWriter format object. diff --git a/pandas/io/feather_format.py b/pandas/io/feather_format.py index ea2d96cd896d9..96ebca16d1892 100644 --- a/pandas/io/feather_format.py +++ b/pandas/io/feather_format.py @@ -98,7 +98,7 @@ def read_feather(path, use_threads=True): .. versionadded 0.21.0 .. deprecated 0.24.0 - use_threads: bool, default True + use_threads : bool, default True Whether to parallelize reading using multiple threads .. versionadded 0.24.0 diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 8291e0ac98cd1..a084a9a12133c 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -58,16 +58,16 @@ class Styler(object): Parameters ---------- - data: Series or DataFrame - precision: int + data : Series or DataFrame + precision : int precision to round floats to, defaults to pd.options.display.precision - table_styles: list-like, default None + table_styles : list-like, default None list of {selector: (attr, value)} dicts; see Notes - uuid: str, default None + uuid : str, default None a unique identifier to avoid CSS collisions; generated automatically - caption: str, default None + caption : str, default None caption to attach to the table - cell_ids: bool, default True + cell_ids : bool, default True If True, each cell will have an ``id`` attribute in their HTML tag. The ``id`` takes the form ``T__row_col`` where ```` is the unique identifier, ```` is the row @@ -359,8 +359,8 @@ def format(self, formatter, subset=None): Parameters ---------- - formatter: str, callable, or dict - subset: IndexSlice + formatter : str, callable, or dict + subset : IndexSlice An argument to ``DataFrame.loc`` that restricts which elements ``formatter`` is applied to. @@ -421,17 +421,15 @@ def render(self, **kwargs): Parameters ---------- - `**kwargs`: - Any additional keyword arguments are passed through - to ``self.template.render``. This is useful when you - need to provide additional variables for a custom - template. + `**kwargs` : Any additional keyword arguments are passed through + to ``self.template.render``. This is useful when you need to provide + additional variables for a custom template. .. versionadded:: 0.20 Returns ------- - rendered: str + rendered : str the rendered HTML Notes @@ -472,7 +470,7 @@ def _update_ctx(self, attrs): update the state of the Styler. Collects a mapping of {index_label: [': ']} - attrs: Series or DataFrame + attrs : Series or DataFrame should contain strings of ': ;: ' Whitespace shouldn't matter and the final trailing ';' shouldn't matter. @@ -689,7 +687,7 @@ def set_precision(self, precision): Parameters ---------- - precision: int + precision : int Returns ------- @@ -728,7 +726,7 @@ def export(self): Returns ------- - styles: list + styles : list See Also -------- @@ -743,7 +741,7 @@ def use(self, styles): Parameters ---------- - styles: list + styles : list list of style functions Returns @@ -763,7 +761,7 @@ def set_uuid(self, uuid): Parameters ---------- - uuid: str + uuid : str Returns ------- @@ -778,7 +776,7 @@ def set_caption(self, caption): Parameters ---------- - caption: str + caption : str Returns ------- @@ -794,7 +792,7 @@ def set_table_styles(self, table_styles): Parameters ---------- - table_styles: list + table_styles : list Each individual table_style should be a dictionary with ``selector`` and ``props`` keys. ``selector`` should be a CSS selector that the style will be applied to (automatically @@ -837,7 +835,7 @@ def hide_columns(self, subset): Parameters ---------- - subset: IndexSlice + subset : IndexSlice An argument to ``DataFrame.loc`` that identifies which columns are hidden. @@ -865,7 +863,7 @@ def highlight_null(self, null_color='red'): Parameters ---------- - null_color: str + null_color : str Returns ------- @@ -883,15 +881,15 @@ def background_gradient(self, cmap='PuBu', low=0, high=0, axis=0, Parameters ---------- - cmap: str or colormap + cmap : str or colormap matplotlib colormap - low, high: float + low, high : float compress the range by these values. - axis: int or str + axis : int or str 1 or 'columns' for columnwise, 0 or 'index' for rowwise - subset: IndexSlice + subset : IndexSlice a valid slice for ``data`` to limit the style application to - text_color_threshold: float or int + text_color_threshold : float or int luminance threshold for determining text color. Facilitates text visibility across varying background colors. From 0 to 1. 0 = all text is dark colored, 1 = all text is light colored. @@ -984,9 +982,9 @@ def set_properties(self, subset=None, **kwargs): Parameters ---------- - subset: IndexSlice + subset : IndexSlice a valid slice for ``data`` to limit the style application to - kwargs: dict + kwargs : dict property: value pairs to be set for each cell Returns @@ -1137,10 +1135,10 @@ def highlight_max(self, subset=None, color='yellow', axis=0): Parameters ---------- - subset: IndexSlice, default None + subset : IndexSlice, default None a valid slice for ``data`` to limit the style application to - color: str, default 'yellow' - axis: int, str, or None; default 0 + color : str, default 'yellow' + axis : int, str, or None; default 0 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise, or ``None`` for tablewise @@ -1157,10 +1155,10 @@ def highlight_min(self, subset=None, color='yellow', axis=0): Parameters ---------- - subset: IndexSlice, default None + subset : IndexSlice, default None a valid slice for ``data`` to limit the style application to - color: str, default 'yellow' - axis: int, str, or None; default 0 + color : str, default 'yellow' + axis : int, str, or None; default 0 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise, or ``None`` for tablewise diff --git a/pandas/io/json/json.py b/pandas/io/json/json.py index 4453416a97f89..38f8cd5412015 100644 --- a/pandas/io/json/json.py +++ b/pandas/io/json/json.py @@ -320,7 +320,7 @@ def read_json(path_or_buf=None, orient=None, typ='frame', dtype=True, .. versionadded:: 0.19.0 - chunksize: integer, default None + chunksize : integer, default None Return JsonReader object for iteration. See the `line-delimted json docs `_ diff --git a/pandas/io/packers.py b/pandas/io/packers.py index ea673101e90b3..19a0b08d8fdda 100644 --- a/pandas/io/packers.py +++ b/pandas/io/packers.py @@ -127,7 +127,7 @@ def to_msgpack(path_or_buf, *args, **kwargs): path_or_buf : string File path, buffer-like, or None if None, return generated string args : an object or objects to serialize - encoding: encoding for unicode objects + encoding : encoding for unicode objects append : boolean whether to append to an existing msgpack (default is False) compress : type of compressor (zlib or blosc), default to None (no @@ -170,7 +170,7 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs): Parameters ---------- path_or_buf : string File path, BytesIO like or string - encoding: Encoding for decoding msgpack str type + encoding : Encoding for decoding msgpack str type iterator : boolean, if True, return an iterator to the unpacker (default is False) diff --git a/pandas/io/parquet.py b/pandas/io/parquet.py index aad59f9805a3b..8170e3b6aea75 100644 --- a/pandas/io/parquet.py +++ b/pandas/io/parquet.py @@ -262,7 +262,7 @@ def read_parquet(path, engine='auto', columns=None, **kwargs): ---------- path : string File path - columns: list, default=None + columns : list, default=None If not None, only these columns will be read from the file. .. versionadded 0.21.1 diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 8c574bcb70363..c01cf6e95ad1f 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -942,7 +942,7 @@ def append(self, key, value, format=None, append=True, columns=None, ---------- key : object value : {Series, DataFrame, Panel} - format: 'table' is the default + format : 'table' is the default table(t) : table format Write as a PyTables Table structure which may perform worse but allow more flexible operations like searching diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 9e07be5e1769e..27f332ca50231 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -685,12 +685,12 @@ def _parse_errorbars(self, label, err): or return the error DataFrame/dict Error bars can be specified in several ways: - Series: the user provides a pandas.Series object of the same + Series : the user provides a pandas.Series object of the same length as the data - ndarray: provides a np.ndarray of the same length as the data - DataFrame/dict: error values are paired with keys matching the + ndarray : provides a np.ndarray of the same length as the data + DataFrame/dict : error values are paired with keys matching the key in the plotted DataFrame - str: the name of the column within the plotted DataFrame + str : the name of the column within the plotted DataFrame """ if err is None: @@ -2453,7 +2453,7 @@ def hist_series(self, by=None, ax=None, grid=True, xlabelsize=None, bin edges are calculated and returned. If bins is a sequence, gives bin edges, including left edge of first bin and right edge of last bin. In this case, bins is returned unmodified. - bins: integer, default 10 + bins : integer, default 10 Number of histogram bins to be used `**kwds` : keywords To be passed to the actual plotting function @@ -2511,22 +2511,22 @@ def grouped_hist(data, column=None, by=None, ax=None, bins=50, figsize=None, Parameters ---------- - data: Series/DataFrame - column: object, optional - by: object, optional - ax: axes, optional - bins: int, default 50 - figsize: tuple, optional - layout: optional - sharex: boolean, default False - sharey: boolean, default False - rot: int, default 90 - grid: bool, default True - kwargs: dict, keyword arguments passed to matplotlib.Axes.hist + data : Series/DataFrame + column : object, optional + by : object, optional + ax : axes, optional + bins : int, default 50 + figsize : tuple, optional + layout : optional + sharex : boolean, default False + sharey : boolean, default False + rot : int, default 90 + grid : bool, default True + kwargs : dict, keyword arguments passed to matplotlib.Axes.hist Returns ------- - axes: collection of Matplotlib Axes + axes : collection of Matplotlib Axes """ _raise_if_no_mpl() _converter._WARN = False @@ -2826,7 +2826,7 @@ def hist(self, bins=10, **kwds): Parameters ---------- - bins: integer, default 10 + bins : integer, default 10 Number of histogram bins to be used `**kwds` : optional Additional keyword arguments are documented in diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index 39765b27cf19c..aeb97a84e594a 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -295,17 +295,17 @@ def andrews_curves(frame, class_column, ax=None, samples=200, color=None, class_column : Name of the column containing class names ax : matplotlib axes object, default None samples : Number of points to plot in each curve - color: list or tuple, optional + color : list or tuple, optional Colors to use for the different classes colormap : str or matplotlib colormap object, default None Colormap to select colors from. If string, load colormap with that name from matplotlib. - kwds: keywords + kwds : keywords Options to pass to matplotlib plotting method Returns ------- - ax: Matplotlib axis object + ax : Matplotlib axis object """ from math import sqrt, pi @@ -464,31 +464,31 @@ def parallel_coordinates(frame, class_column, cols=None, ax=None, color=None, Parameters ---------- - frame: DataFrame - class_column: str + frame : DataFrame + class_column : str Column name containing class names - cols: list, optional + cols : list, optional A list of column names to use - ax: matplotlib.axis, optional + ax : matplotlib.axis, optional matplotlib axis object - color: list or tuple, optional + color : list or tuple, optional Colors to use for the different classes - use_columns: bool, optional + use_columns : bool, optional If true, columns will be used as xticks - xticks: list or tuple, optional + xticks : list or tuple, optional A list of values to use for xticks - colormap: str or matplotlib colormap, default None + colormap : str or matplotlib colormap, default None Colormap to use for line colors. - axvlines: bool, optional + axvlines : bool, optional If true, vertical lines will be added at each xtick - axvlines_kwds: keywords, optional + axvlines_kwds : keywords, optional Options to be passed to axvline method for vertical lines - sort_labels: bool, False + sort_labels : bool, False Sort class_column labels, useful when assigning colors .. versionadded:: 0.20.0 - kwds: keywords + kwds : keywords Options to pass to matplotlib plotting method Returns @@ -575,10 +575,10 @@ def lag_plot(series, lag=1, ax=None, **kwds): Parameters ---------- - series: Time series - lag: lag of the scatter plot, default 1 - ax: Matplotlib axis object, optional - kwds: Matplotlib scatter method keyword arguments, optional + series : Time series + lag : lag of the scatter plot, default 1 + ax : Matplotlib axis object, optional + kwds : Matplotlib scatter method keyword arguments, optional Returns ------- diff --git a/pandas/plotting/_tools.py b/pandas/plotting/_tools.py index 7618afd42010f..012a6fd108925 100644 --- a/pandas/plotting/_tools.py +++ b/pandas/plotting/_tools.py @@ -30,10 +30,10 @@ def table(ax, data, rowLabels=None, colLabels=None, **kwargs): Parameters ---------- - `ax`: Matplotlib axes object - `data`: DataFrame or Series + `ax` : Matplotlib axes object + `data` : DataFrame or Series data for table contents - `kwargs`: keywords, optional + `kwargs` : keywords, optional keyword arguments which passed to matplotlib.table.table. If `rowLabels` or `colLabels` is not specified, data index or column name will be used. diff --git a/pandas/tseries/offsets.py b/pandas/tseries/offsets.py index 067a7d4622ca2..440a6a3558d9e 100644 --- a/pandas/tseries/offsets.py +++ b/pandas/tseries/offsets.py @@ -1153,9 +1153,9 @@ class SemiMonthEnd(SemiMonthOffset): Parameters ---------- - n: int + n : int normalize : bool, default False - day_of_month: int, {1, 3,...,27}, default 15 + day_of_month : int, {1, 3,...,27}, default 15 """ _prefix = 'SM' _min_day_of_month = 1 @@ -1212,9 +1212,9 @@ class SemiMonthBegin(SemiMonthOffset): Parameters ---------- - n: int + n : int normalize : bool, default False - day_of_month: int, {2, 3,...,27}, default 15 + day_of_month : int, {2, 3,...,27}, default 15 """ _prefix = 'SMS' @@ -1432,11 +1432,11 @@ def _get_offset_day(self, other): Parameters ---------- - other: datetime + other : datetime Returns ------- - day: int + day : int """ mstart = datetime(other.year, other.month, 1) wday = mstart.weekday()