From 8b65f361313507d1f9f7e06b5454e0c4483e5d4e Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Wed, 26 Dec 2018 01:11:50 +0000 Subject: [PATCH] DOC: Fixing several doc warnings --- doc/source/basics.rst | 4 +--- doc/source/tutorials.rst | 8 ++++---- doc/source/whatsnew/v0.13.0.rst | 4 ++-- doc/source/whatsnew/v0.13.1.rst | 2 +- doc/source/whatsnew/v0.14.1.rst | 1 + doc/source/whatsnew/v0.15.0.rst | 1 + doc/source/whatsnew/v0.20.0.rst | 1 + 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/source/basics.rst b/doc/source/basics.rst index 0f6b5cd0b5e43..91bf96a9e8681 100644 --- a/doc/source/basics.rst +++ b/doc/source/basics.rst @@ -374,9 +374,7 @@ To evaluate single-element pandas objects in a boolean context, use the method >>> df and df2 - These will both raise errors, as you are trying to compare multiple values. - - .. code-block:: python-traceback + These will both raise errors, as you are trying to compare multiple values.:: ValueError: The truth value of an array is ambiguous. Use a.empty, a.any() or a.all(). diff --git a/doc/source/tutorials.rst b/doc/source/tutorials.rst index c39227e67ffe8..f05d1c6e0b12b 100644 --- a/doc/source/tutorials.rst +++ b/doc/source/tutorials.rst @@ -88,12 +88,12 @@ Video Tutorials `GitHub repo `__ * `Data analysis in Python with pandas `_ (2016-2018) - `GitHub repo `_ and - `Jupyter Notebook `_ + `GitHub repo `__ and + `Jupyter Notebook `__ * `Best practices with pandas `_ (2018) - `GitHub repo `_ and - `Jupyter Notebook `_ + `GitHub repo `__ and + `Jupyter Notebook `__ Various Tutorials diff --git a/doc/source/whatsnew/v0.13.0.rst b/doc/source/whatsnew/v0.13.0.rst index 7495e9fe25339..0f799c069f494 100644 --- a/doc/source/whatsnew/v0.13.0.rst +++ b/doc/source/whatsnew/v0.13.0.rst @@ -690,7 +690,7 @@ Enhancements .. ipython:: python - ser = Series([1, 3, np.nan, np.nan, np.nan, 11]) + ser = pd.Series([1, 3, np.nan, np.nan, np.nan, 11]) ser.interpolate(limit=2) - Added ``wide_to_long`` panel data convenience function. See :ref:`the docs`. @@ -706,7 +706,7 @@ Enhancements }) df["id"] = df.index df - wide_to_long(df, ["A", "B"], i="id", j="year") + pd.wide_to_long(df, ["A", "B"], i="id", j="year") .. _scipy: http://www.scipy.org .. _documentation: http://docs.scipy.org/doc/scipy/reference/interpolate.html#univariate-interpolation diff --git a/doc/source/whatsnew/v0.13.1.rst b/doc/source/whatsnew/v0.13.1.rst index edc8379162c07..568dab2d56f31 100644 --- a/doc/source/whatsnew/v0.13.1.rst +++ b/doc/source/whatsnew/v0.13.1.rst @@ -88,7 +88,7 @@ Output Formatting Enhancements Previously output might look like: - .. oode-block:: text + .. code-block:: text age today diff 0 2001-01-01 00:00:00 2013-04-19 00:00:00 4491 days, 00:00:00 diff --git a/doc/source/whatsnew/v0.14.1.rst b/doc/source/whatsnew/v0.14.1.rst index c47570a50b9c5..98ebbd6a52344 100644 --- a/doc/source/whatsnew/v0.14.1.rst +++ b/doc/source/whatsnew/v0.14.1.rst @@ -122,6 +122,7 @@ Enhancements pytz timezones across pandas. (:issue:`4688`) .. ipython:: python + rng = pd.date_range('3/6/2012 00:00', periods=10, freq='D', tz='dateutil/Europe/London') rng.tz diff --git a/doc/source/whatsnew/v0.15.0.rst b/doc/source/whatsnew/v0.15.0.rst index e7a7d8a7e3b06..6f74f0393d123 100644 --- a/doc/source/whatsnew/v0.15.0.rst +++ b/doc/source/whatsnew/v0.15.0.rst @@ -316,6 +316,7 @@ Timezone handling improvements previously this resulted in ``Exception`` or ``TypeError`` (:issue:`7812`) .. ipython:: python + :okwarning: ts = Timestamp('2014-08-01 09:00', tz='US/Eastern') ts diff --git a/doc/source/whatsnew/v0.20.0.rst b/doc/source/whatsnew/v0.20.0.rst index 11e2fbad6595b..c78d5c1d178d2 100644 --- a/doc/source/whatsnew/v0.20.0.rst +++ b/doc/source/whatsnew/v0.20.0.rst @@ -189,6 +189,7 @@ URLs and paths are now inferred using their file extensions. Additionally, support for bz2 compression in the python 2 C-engine improved (:issue:`14874`). .. ipython:: python + :okwarning: url = ('https://github.com/{repo}/raw/{branch}/{path}' .format(repo='pandas-dev/pandas',