From 32b9f472ad155e216012ddc99c36330621426777 Mon Sep 17 00:00:00 2001 From: anjalis2112 Date: Fri, 24 Jan 2020 01:32:24 +0530 Subject: [PATCH 1/5] changed . --- doc/source/user_guide/indexing.rst | 2 +- doc/source/user_guide/io.rst | 2 +- doc/source/user_guide/reshaping.rst | 2 +- pandas/core/generic.py | 2 +- pandas/core/series.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/source/user_guide/indexing.rst b/doc/source/user_guide/indexing.rst index a8cdf4a61073d..f24fad89fd826 100644 --- a/doc/source/user_guide/indexing.rst +++ b/doc/source/user_guide/indexing.rst @@ -105,7 +105,7 @@ Basics ------ As mentioned when introducing the data structures in the :ref:`last section -`, the primary function of indexing with ``[]`` (a.k.a. ``__getitem__`` +`, the primary function of indexing with ``[]`` (a.k.a ``__getitem__`` for those familiar with implementing class behavior in Python) is selecting out lower-dimensional slices. The following table shows return type values when indexing pandas objects with ``[]``: diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index d0780e4ab8dba..df67b4daa57a8 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -49,7 +49,7 @@ The pandas I/O API is a set of top level ``reader`` functions accessed like CSV & text files ---------------- -The workhorse function for reading text files (a.k.a. flat files) is +The workhorse function for reading text files (a.k.a flat files) is :func:`read_csv`. See the :ref:`cookbook` for some advanced strategies. Parsing options diff --git a/doc/source/user_guide/reshaping.rst b/doc/source/user_guide/reshaping.rst index b28354cd8b5f2..4abcf1dd8aa29 100644 --- a/doc/source/user_guide/reshaping.rst +++ b/doc/source/user_guide/reshaping.rst @@ -760,7 +760,7 @@ we can also pass in ``sum``. values='val0', index='row', columns='col', aggfunc='sum', fill_value=0) Another aggregation we can do is calculate the frequency in which the columns -and rows occur together a.k.a. "cross tabulation". To do this, we can pass +and rows occur together a.k.a "cross tabulation". To do this, we can pass ``size`` to the ``aggfunc`` parameter. .. ipython:: python diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 6c04212e26924..15904769957ac 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -7371,7 +7371,7 @@ def at_time( self: FrameOrSeries, time, asof: bool_t = False, axis=None ) -> FrameOrSeries: """ - Select values at particular time of day (e.g. 9:30AM). + Select values at particular time of day (e.g., 9:30AM). Parameters ---------- diff --git a/pandas/core/series.py b/pandas/core/series.py index ffe0642f799fa..6d0f954cde60a 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -3389,7 +3389,7 @@ def explode(self) -> "Series": See Also -------- Series.str.split : Split string values on specified separator. - Series.unstack : Unstack, a.k.a. pivot, Series with MultiIndex + Series.unstack : Unstack, a.k.a pivot, Series with MultiIndex to produce DataFrame. DataFrame.melt : Unpivot a DataFrame from wide format to long format. DataFrame.explode : Explode a DataFrame from list-like @@ -3432,7 +3432,7 @@ def explode(self) -> "Series": def unstack(self, level=-1, fill_value=None): """ - Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame. + Unstack, a.k.a pivot, Series with MultiIndex to produce DataFrame. The level involved will automatically get sorted. Parameters From da996f463923ed98be9216efe1b0f71bdc25de40 Mon Sep 17 00:00:00 2001 From: Anjali Singh Date: Fri, 24 Jan 2020 16:23:54 +0530 Subject: [PATCH 2/5] Update indexing.rst --- doc/source/user_guide/indexing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/indexing.rst b/doc/source/user_guide/indexing.rst index f24fad89fd826..a8cdf4a61073d 100644 --- a/doc/source/user_guide/indexing.rst +++ b/doc/source/user_guide/indexing.rst @@ -105,7 +105,7 @@ Basics ------ As mentioned when introducing the data structures in the :ref:`last section -`, the primary function of indexing with ``[]`` (a.k.a ``__getitem__`` +`, the primary function of indexing with ``[]`` (a.k.a. ``__getitem__`` for those familiar with implementing class behavior in Python) is selecting out lower-dimensional slices. The following table shows return type values when indexing pandas objects with ``[]``: From 8e0f2b7e0aae974b61748eaab32fe2f10c54776e Mon Sep 17 00:00:00 2001 From: Anjali Singh Date: Fri, 24 Jan 2020 16:24:39 +0530 Subject: [PATCH 3/5] Update io.rst --- doc/source/user_guide/io.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index df67b4daa57a8..d0780e4ab8dba 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -49,7 +49,7 @@ The pandas I/O API is a set of top level ``reader`` functions accessed like CSV & text files ---------------- -The workhorse function for reading text files (a.k.a flat files) is +The workhorse function for reading text files (a.k.a. flat files) is :func:`read_csv`. See the :ref:`cookbook` for some advanced strategies. Parsing options From 31f5575c1175769df6a3087d52af577b03e2b613 Mon Sep 17 00:00:00 2001 From: Anjali Singh Date: Fri, 24 Jan 2020 16:25:22 +0530 Subject: [PATCH 4/5] Update reshaping.rst --- doc/source/user_guide/reshaping.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/user_guide/reshaping.rst b/doc/source/user_guide/reshaping.rst index 4abcf1dd8aa29..b28354cd8b5f2 100644 --- a/doc/source/user_guide/reshaping.rst +++ b/doc/source/user_guide/reshaping.rst @@ -760,7 +760,7 @@ we can also pass in ``sum``. values='val0', index='row', columns='col', aggfunc='sum', fill_value=0) Another aggregation we can do is calculate the frequency in which the columns -and rows occur together a.k.a "cross tabulation". To do this, we can pass +and rows occur together a.k.a. "cross tabulation". To do this, we can pass ``size`` to the ``aggfunc`` parameter. .. ipython:: python From 9c1d804b6eda51db17b825aee18b9d59f6fdd4a9 Mon Sep 17 00:00:00 2001 From: Anjali Singh Date: Fri, 24 Jan 2020 16:27:06 +0530 Subject: [PATCH 5/5] DOC: changed '. ' to avoid truncation. --- pandas/core/series.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 6d0f954cde60a..c275591d67c22 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -3389,7 +3389,7 @@ def explode(self) -> "Series": See Also -------- Series.str.split : Split string values on specified separator. - Series.unstack : Unstack, a.k.a pivot, Series with MultiIndex + Series.unstack : Unstack, a.k.a. pivot, Series with MultiIndex to produce DataFrame. DataFrame.melt : Unpivot a DataFrame from wide format to long format. DataFrame.explode : Explode a DataFrame from list-like @@ -3432,7 +3432,7 @@ def explode(self) -> "Series": def unstack(self, level=-1, fill_value=None): """ - Unstack, a.k.a pivot, Series with MultiIndex to produce DataFrame. + Unstack, also known as pivot, Series with MultiIndex to produce DataFrame. The level involved will automatically get sorted. Parameters