Skip to content

Commit

Permalink
DOC: Fix GL01 and GL02 errors in the docstrings (pandas-dev#27988)
Browse files Browse the repository at this point in the history
  • Loading branch information
steveayers124 authored and galuhsahid committed Aug 25, 2019
1 parent 8641797 commit f6ae749
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
37 changes: 25 additions & 12 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,22 @@ def ip():

@pytest.fixture(params=[True, False, None])
def observed(request):
""" pass in the observed keyword to groupby for [True, False]
"""
Pass in the observed keyword to groupby for [True, False]
This indicates whether categoricals should return values for
values which are not in the grouper [False / None], or only values which
appear in the grouper [True]. [None] is supported for future compatibility
if we decide to change the default (and would need to warn if this
parameter is not passed)"""
parameter is not passed).
"""
return request.param


@pytest.fixture(params=[True, False, None])
def ordered_fixture(request):
"""Boolean 'ordered' parameter for Categorical."""
"""
Boolean 'ordered' parameter for Categorical.
"""
return request.param


Expand Down Expand Up @@ -234,15 +238,16 @@ def cython_table_items(request):


def _get_cython_table_params(ndframe, func_names_and_expected):
"""combine frame, functions from SelectionMixin._cython_table
"""
Combine frame, functions from SelectionMixin._cython_table
keys and expected result.
Parameters
----------
ndframe : DataFrame or Series
func_names_and_expected : Sequence of two items
The first item is a name of a NDFrame method ('sum', 'prod') etc.
The second item is the expected return value
The second item is the expected return value.
Returns
-------
Expand Down Expand Up @@ -341,7 +346,8 @@ def strict_data_files(pytestconfig):

@pytest.fixture
def datapath(strict_data_files):
"""Get the path to a data file.
"""
Get the path to a data file.
Parameters
----------
Expand Down Expand Up @@ -375,7 +381,9 @@ def deco(*args):

@pytest.fixture
def iris(datapath):
"""The iris dataset as a DataFrame."""
"""
The iris dataset as a DataFrame.
"""
return pd.read_csv(datapath("data", "iris.csv"))


Expand Down Expand Up @@ -504,7 +512,8 @@ def tz_aware_fixture(request):

@pytest.fixture(params=STRING_DTYPES)
def string_dtype(request):
"""Parametrized fixture for string dtypes.
"""
Parametrized fixture for string dtypes.
* str
* 'str'
Expand All @@ -515,7 +524,8 @@ def string_dtype(request):

@pytest.fixture(params=BYTES_DTYPES)
def bytes_dtype(request):
"""Parametrized fixture for bytes dtypes.
"""
Parametrized fixture for bytes dtypes.
* bytes
* 'bytes'
Expand All @@ -525,7 +535,8 @@ def bytes_dtype(request):

@pytest.fixture(params=OBJECT_DTYPES)
def object_dtype(request):
"""Parametrized fixture for object dtypes.
"""
Parametrized fixture for object dtypes.
* object
* 'object'
Expand All @@ -535,7 +546,8 @@ def object_dtype(request):

@pytest.fixture(params=DATETIME64_DTYPES)
def datetime64_dtype(request):
"""Parametrized fixture for datetime64 dtypes.
"""
Parametrized fixture for datetime64 dtypes.
* 'datetime64[ns]'
* 'M8[ns]'
Expand All @@ -545,7 +557,8 @@ def datetime64_dtype(request):

@pytest.fixture(params=TIMEDELTA64_DTYPES)
def timedelta64_dtype(request):
"""Parametrized fixture for timedelta64 dtypes.
"""
Parametrized fixture for timedelta64 dtypes.
* 'timedelta64[ns]'
* 'm8[ns]'
Expand Down
24 changes: 16 additions & 8 deletions pandas/io/html.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""":mod:`pandas.io.html` is a module containing functionality for dealing with
"""
:mod:`pandas.io.html` is a module containing functionality for dealing with
HTML IO.
"""
Expand Down Expand Up @@ -58,7 +59,8 @@ def _importers():


def _remove_whitespace(s, regex=_RE_WHITESPACE):
"""Replace extra whitespace inside of a string with a single space.
"""
Replace extra whitespace inside of a string with a single space.
Parameters
----------
Expand All @@ -77,7 +79,8 @@ def _remove_whitespace(s, regex=_RE_WHITESPACE):


def _get_skiprows(skiprows):
"""Get an iterator given an integer, slice or container.
"""
Get an iterator given an integer, slice or container.
Parameters
----------
Expand Down Expand Up @@ -107,7 +110,8 @@ def _get_skiprows(skiprows):


def _read(obj):
"""Try to read from a url, file or string.
"""
Try to read from a url, file or string.
Parameters
----------
Expand Down Expand Up @@ -136,7 +140,8 @@ def _read(obj):


class _HtmlFrameParser:
"""Base class for parsers that parse HTML into DataFrames.
"""
Base class for parsers that parse HTML into DataFrames.
Parameters
----------
Expand Down Expand Up @@ -515,7 +520,8 @@ def _handle_hidden_tables(self, tbl_list, attr_name):


class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):
"""HTML to DataFrame parser that uses BeautifulSoup under the hood.
"""
HTML to DataFrame parser that uses BeautifulSoup under the hood.
See Also
--------
Expand Down Expand Up @@ -622,7 +628,8 @@ def _build_xpath_expr(attrs):


class _LxmlFrameParser(_HtmlFrameParser):
"""HTML to DataFrame parser that uses lxml under the hood.
"""
HTML to DataFrame parser that uses lxml under the hood.
Warning
-------
Expand Down Expand Up @@ -937,7 +944,8 @@ def read_html(
keep_default_na=True,
displayed_only=True,
):
r"""Read HTML tables into a ``list`` of ``DataFrame`` objects.
r"""
Read HTML tables into a ``list`` of ``DataFrame`` objects.
Parameters
----------
Expand Down

0 comments on commit f6ae749

Please sign in to comment.