From dc558036580f47ba15a900e1c7f04b3090f2b228 Mon Sep 17 00:00:00 2001 From: akhilw0811 Date: Fri, 3 Oct 2025 15:45:37 -0400 Subject: [PATCH] DOC: Expand data table representation with labels and index; add link to indexing (#62358) --- doc/source/_static/data_table_rep.svg | 64 +++++++++++++++++++ .../intro_tutorials/01_table_oriented.rst | 13 +++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 doc/source/_static/data_table_rep.svg diff --git a/doc/source/_static/data_table_rep.svg b/doc/source/_static/data_table_rep.svg new file mode 100644 index 0000000000000..b795b64310651 --- /dev/null +++ b/doc/source/_static/data_table_rep.svg @@ -0,0 +1,64 @@ + + + + + + + DataFrame: columns (top) and index (left) + + + + + + col A + col B + col C + + + + index + + + + + + 0 + 1 + 2 + + + + + + A0 + B0 + C0 + + + + + + A1 + B1 + C1 + + + + + + A2 + B2 + C2 + + + header (labels) + index + data + diff --git a/doc/source/getting_started/intro_tutorials/01_table_oriented.rst b/doc/source/getting_started/intro_tutorials/01_table_oriented.rst index 7e86ad6c499d9..9291f0a6d5eb7 100644 --- a/doc/source/getting_started/intro_tutorials/01_table_oriented.rst +++ b/doc/source/getting_started/intro_tutorials/01_table_oriented.rst @@ -29,9 +29,20 @@ documentation. pandas data table representation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. image:: ../../_static/schemas/01_table_dataframe.svg +.. figure:: /_static/data_table_rep.svg + :alt: DataFrame with column labels and row index + :width: 85% :align: center + A :class:`pandas.DataFrame` is a 2D table. Columns are identified by their + **labels** (shown across the top), and rows are identified by the **index** + (shown on the left). + +.. note:: + + The **index** labels rows and enables reliable alignment, selection and joins + across objects. See :ref:`indexing` for a deeper introduction. + .. raw:: html