From 7dd5523a2fa5d5f3f5ede04dd5ed50019153cd42 Mon Sep 17 00:00:00 2001 From: noah-asing <7989798+noah-asing@users.noreply.github.com> Date: Sat, 3 Feb 2024 15:16:19 -0800 Subject: [PATCH 1/3] Improved clarity and consistency on "brackets" usage --- .../getting_started/intro_tutorials/02_read_write.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/getting_started/intro_tutorials/02_read_write.rst b/doc/source/getting_started/intro_tutorials/02_read_write.rst index 832c2cc25712f..ae658ec6abbaf 100644 --- a/doc/source/getting_started/intro_tutorials/02_read_write.rst +++ b/doc/source/getting_started/intro_tutorials/02_read_write.rst @@ -97,11 +97,11 @@ in this ``DataFrame`` are integers (``int64``), floats (``float64``) and strings (``object``). .. note:: - When asking for the ``dtypes``, no brackets are used! + When asking for the ``dtypes``, no parentheses ``()`` are used! ``dtypes`` is an attribute of a ``DataFrame`` and ``Series``. Attributes - of a ``DataFrame`` or ``Series`` do not need brackets. Attributes + of a ``DataFrame`` or ``Series`` do not need ``()``. Attributes represent a characteristic of a ``DataFrame``/``Series``, whereas - methods (which require brackets) *do* something with the + methods (which require parentheses ``()``) *do* something with the ``DataFrame``/``Series`` as introduced in the :ref:`first tutorial <10min_tut_01_tableoriented>`. .. raw:: html From 40abb565987bb651a4df665fcc3cf508574281e6 Mon Sep 17 00:00:00 2001 From: noah-asing <7989798+noah-asing@users.noreply.github.com> Date: Sat, 3 Feb 2024 15:23:24 -0800 Subject: [PATCH 2/3] apply consistent language to specify square brackets --- doc/source/getting_started/intro_tutorials/03_subset_data.rst | 4 ++-- doc/source/getting_started/intro_tutorials/05_add_columns.rst | 2 +- .../intro_tutorials/06_calculate_statistics.rst | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/getting_started/intro_tutorials/03_subset_data.rst b/doc/source/getting_started/intro_tutorials/03_subset_data.rst index 6d7ec01551572..88d7d653c9e83 100644 --- a/doc/source/getting_started/intro_tutorials/03_subset_data.rst +++ b/doc/source/getting_started/intro_tutorials/03_subset_data.rst @@ -101,7 +101,7 @@ selection brackets ``[]``. .. note:: The inner square brackets define a :ref:`Python list ` with column names, whereas - the outer brackets are used to select the data from a pandas + the outer square brackets are used to select the data from a pandas ``DataFrame`` as seen in the previous example. The returned data type is a pandas DataFrame: @@ -354,7 +354,7 @@ See the user guide section on :ref:`different choices for indexing REMEMBER - When selecting subsets of data, square brackets ``[]`` are used. -- Inside these brackets, you can use a single column/row label, a list +- Inside these square brackets, you can use a single column/row label, a list of column/row labels, a slice of labels, a conditional expression or a colon. - Select specific rows and/or columns using ``loc`` when using the row diff --git a/doc/source/getting_started/intro_tutorials/05_add_columns.rst b/doc/source/getting_started/intro_tutorials/05_add_columns.rst index d59a70cc2818e..3e0f75b210dbb 100644 --- a/doc/source/getting_started/intro_tutorials/05_add_columns.rst +++ b/doc/source/getting_started/intro_tutorials/05_add_columns.rst @@ -51,7 +51,7 @@ hPa, the conversion factor is 1.882*) air_quality["london_mg_per_cubic"] = air_quality["station_london"] * 1.882 air_quality.head() -To create a new column, use the ``[]`` brackets with the new column name +To create a new column, use the square brackets ``[]`` with the new column name at the left side of the assignment. .. raw:: html diff --git a/doc/source/getting_started/intro_tutorials/06_calculate_statistics.rst b/doc/source/getting_started/intro_tutorials/06_calculate_statistics.rst index fe3ae820e7085..668925ce79252 100644 --- a/doc/source/getting_started/intro_tutorials/06_calculate_statistics.rst +++ b/doc/source/getting_started/intro_tutorials/06_calculate_statistics.rst @@ -162,7 +162,7 @@ columns by passing ``numeric_only=True``: It does not make much sense to get the average value of the ``Pclass``. If we are only interested in the average age for each gender, the -selection of columns (rectangular brackets ``[]`` as usual) is supported +selection of columns (square brackets ``[]`` as usual) is supported on the grouped data as well: .. ipython:: python From 7847a60f0f86beab77690c56cab39fcea28f5ca3 Mon Sep 17 00:00:00 2001 From: noah-asing <7989798+noah-asing@users.noreply.github.com> Date: Sat, 3 Feb 2024 22:08:53 -0800 Subject: [PATCH 3/3] retrigger docbuild check - could not reproduce failed doc build