From 172a85ef0503198f700c2c09b9460d6103efe64b Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Sat, 25 Feb 2017 21:34:24 +0100 Subject: [PATCH] DOC: fix doc build warnings --- doc/source/advanced.rst | 1 + doc/source/basics.rst | 2 +- doc/source/contributing.rst | 6 +++--- doc/source/install.rst | 2 +- doc/source/io.rst | 8 ++++---- doc/source/whatsnew/v0.20.0.txt | 2 +- pandas/core/generic.py | 1 + pandas/io/html.py | 2 +- pandas/io/json/normalize.py | 9 ++++----- pandas/io/parsers.py | 10 +++++----- 10 files changed, 22 insertions(+), 21 deletions(-) diff --git a/doc/source/advanced.rst b/doc/source/advanced.rst index b6f015c15606d..f380070ddac79 100644 --- a/doc/source/advanced.rst +++ b/doc/source/advanced.rst @@ -965,6 +965,7 @@ The different indexing operation can potentially change the dtype of a ``Series` res .. ipython:: python + series2 = pd.Series([True]) series2.dtype res = series2.reindex_like(series1) diff --git a/doc/source/basics.rst b/doc/source/basics.rst index f5f7c73223595..f649b3fd8a9a3 100644 --- a/doc/source/basics.rst +++ b/doc/source/basics.rst @@ -1889,7 +1889,7 @@ gotchas Performing selection operations on ``integer`` type data can easily upcast the data to ``floating``. The dtype of the input data will be preserved in cases where ``nans`` are not introduced (starting in 0.11.0) -See also :ref:`Support for integer ``NA`` ` +See also :ref:`Support for integer NA ` .. ipython:: python diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 5c2bb9b73d618..2f838a3ab2386 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -461,7 +461,7 @@ C (cpplint) *pandas* uses the `Google `_ standard. Google provides an open source style checker called ``cpplint``, but we -use a fork of it that can be found `here `_. +use a fork of it that can be found `here `__. Here are *some* of the more common ``cpplint`` issues: - we restrict line-length to 80 characters to promote readability @@ -479,7 +479,7 @@ You can also run this command on an entire directory if necessary:: To make your commits compliant with this standard, you can install the `ClangFormat `_ tool, which can be -downloaded `here `_. To configure, in your home directory, +downloaded `here `__. To configure, in your home directory, run the following command:: clang-format style=google -dump-config > .clang-format @@ -611,7 +611,7 @@ Or with one of the following constructs:: pytest pandas/tests/[test-module].py::[TestClass] pytest pandas/tests/[test-module].py::[TestClass]::[test_method] -For more, see the `pytest`_ documentation. +For more, see the `pytest `_ documentation. .. versionadded:: 0.20.0 diff --git a/doc/source/install.rst b/doc/source/install.rst index 80a5d7e7d375b..8b0fec6a3dac3 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -282,7 +282,7 @@ Optional Dependencies okay.) * `BeautifulSoup4`_ and `lxml`_ * `BeautifulSoup4`_ and `html5lib`_ and `lxml`_ - * Only `lxml`_, although see :ref:`HTML Table Parsing ` + * Only `lxml`_, although see :ref:`HTML Table Parsing ` for reasons as to why you should probably **not** take this approach. .. warning:: diff --git a/doc/source/io.rst b/doc/source/io.rst index 55ef2c09d43e4..35e8b77782183 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -2043,7 +2043,7 @@ Reading HTML Content .. warning:: - We **highly encourage** you to read the :ref:`HTML Table Parsing gotchas` + We **highly encourage** you to read the :ref:`HTML Table Parsing gotchas ` below regarding the issues surrounding the BeautifulSoup4/html5lib/lxml parsers. .. versionadded:: 0.12.0 @@ -4681,7 +4681,7 @@ The key functions are: Supported Data Types -++++++++++++++++++++ +'''''''''''''''''''' Pandas supports all these `BigQuery data types `__: ``STRING``, ``INTEGER`` (64bit), ``FLOAT`` (64 bit), ``BOOLEAN`` and @@ -4689,7 +4689,7 @@ Pandas supports all these `BigQuery data types `. + HTML parsing libraries `. Expect to do some cleanup after you call this function. For example, you might need to manually assign column names if the column names are diff --git a/pandas/io/json/normalize.py b/pandas/io/json/normalize.py index d684441c5974d..f29472155da17 100644 --- a/pandas/io/json/normalize.py +++ b/pandas/io/json/normalize.py @@ -106,11 +106,10 @@ def json_normalize(data, record_path=None, meta=None, path to records is ['foo', 'bar'] meta_prefix : string, default None errors : {'raise', 'ignore'}, default 'raise' - - * ignore : will ignore KeyError if keys listed in meta are not - always present - * raise : will raise KeyError if keys listed in meta are not - always present + * 'ignore' : will ignore KeyError if keys listed in meta are not + always present + * 'raise' : will raise KeyError if keys listed in meta are not + always present .. versionadded:: 0.20.0 diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index 88d0c6c12c04f..78c5247818970 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -181,7 +181,7 @@ If True and parse_dates is enabled, pandas will attempt to infer the format of the datetime strings in the columns, and if it can be inferred, switch to a faster method of parsing them. In some cases this can increase the - parsing speed by ~5-10x. + parsing speed by 5-10x. keep_date_col : boolean, default False If True and parse_dates specifies combining multiple columns then keep the original columns. @@ -200,10 +200,10 @@ Return TextFileReader object for iteration or getting chunks with ``get_chunk()``. chunksize : int, default None - Return TextFileReader object for iteration. `See IO Tools docs for more - information - `_ on - ``iterator`` and ``chunksize``. + Return TextFileReader object for iteration. + See the `IO Tools docs + `_ + for more information on ``iterator`` and ``chunksize``. compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None}, default 'infer' For on-the-fly decompression of on-disk data. If 'infer', then use gzip, bz2, zip or xz if filepath_or_buffer is a string ending in '.gz', '.bz2',