Repository: pandas-dev/pandas
Pull request #60441 (2024-11-28 17:31:21)

DOC: fix SA01,ES01 for pandas.infer_freq
fixes

```
pandas.infer_freq SA01, ES01
```


Patch:
diff --git a/ci/code_checks.sh b/ci/code_checks.sh
index 9faa2a2496..dde98a01cc 100755
--- a/ci/code_checks.sh
+++ b/ci/code_checks.sh
@@ -83,22 +83,18 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
         -i "pandas.Timestamp.resolution PR02" \
         -i "pandas.Timestamp.tzinfo GL08" \
         -i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
-        -i "pandas.arrays.IntegerArray SA01" \
         -i "pandas.arrays.IntervalArray.length SA01" \
         -i "pandas.arrays.NumpyExtensionArray SA01" \
         -i "pandas.arrays.TimedeltaArray PR07,SA01" \
         -i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
         -i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
-        -i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
         -i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
         -i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
         -i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
         -i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
-        -i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
         -i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
         -i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
         -i "pandas.core.resample.Resampler.get_group RT03,SA01" \
-        -i "pandas.core.resample.Resampler.indices SA01" \
         -i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
         -i "pandas.core.resample.Resampler.mean SA01" \
         -i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
@@ -108,15 +104,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
         -i "pandas.core.resample.Resampler.std SA01" \
         -i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
         -i "pandas.core.resample.Resampler.var SA01" \
-        -i "pandas.errors.IntCastingNaNError SA01" \
         -i "pandas.errors.NullFrequencyError SA01" \
         -i "pandas.errors.NumbaUtilError SA01" \
         -i "pandas.errors.PerformanceWarning SA01" \
         -i "pandas.errors.UndefinedVariableError PR01,SA01" \
         -i "pandas.errors.ValueLabelTypeMismatch SA01" \
-        -i "pandas.infer_freq SA01" \
         -i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
-        -i "pandas.io.stata.StataWriter.write_file SA01" \
         -i "pandas.plotting.andrews_curves RT03,SA01" \
         -i "pandas.plotting.scatter_matrix PR07,SA01" \
         -i "pandas.tseries.offsets.BDay PR02,SA01" \
diff --git a/doc/source/getting_started/install.rst b/doc/source/getting_started/install.rst
index b3982c4ad0..bda959f380 100644
--- a/doc/source/getting_started/install.rst
+++ b/doc/source/getting_started/install.rst
@@ -193,25 +193,25 @@ Visualization
 
 Installable with ``pip install "pandas[plot, output-formatting]"``.
 
-========================= ================== ================== =============================================================
-Dependency                Minimum Version    pip extra          Notes
-========================= ================== ================== =============================================================
-matplotlib                3.6.3              plot               Plotting library
-Jinja2                    3.1.2              output-formatting  Conditional formatting with DataFrame.style
-tabulate                  0.9.0              output-formatting  Printing in Markdown-friendly format (see `tabulate`_)
-========================= ================== ================== =============================================================
+========================================================== ================== ================== =======================================================
+Dependency                                                 Minimum Version    pip extra          Notes
+========================================================== ================== ================== =======================================================
+`matplotlib <https://github.com/matplotlib/matplotlib>`__  3.6.3              plot               Plotting library
+`Jinja2 <https://github.com/pallets/jinja>`__              3.1.2              output-formatting  Conditional formatting with DataFrame.style
+`tabulate <https://github.com/astanin/python-tabulate>`__  0.9.0              output-formatting  Printing in Markdown-friendly format (see `tabulate`_)
+========================================================== ================== ================== =======================================================
 
 Computation
 ^^^^^^^^^^^
 
 Installable with ``pip install "pandas[computation]"``.
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-SciPy                     1.10.0             computation     Miscellaneous statistical functions
-xarray                    2022.12.0          computation     pandas-like API for N-dimensional data
-========================= ================== =============== =============================================================
+============================================== ================== =============== =======================================
+Dependency                                     Minimum Version    pip extra       Notes
+============================================== ================== =============== =======================================
+`SciPy <https://github.com/scipy/scipy>`__     1.10.0             computation     Miscellaneous statistical functions
+`xarray <https://github.com/pydata/xarray>`__  2022.12.0          computation     pandas-like API for N-dimensional data
+============================================== ================== =============== =======================================
 
 .. _install.excel_dependencies:
 
@@ -220,29 +220,29 @@ Excel files
 
 Installable with ``pip install "pandas[excel]"``.
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-xlrd                      2.0.1              excel           Reading for xls files
-xlsxwriter                3.0.5              excel           Writing for xlsx files
-openpyxl                  3.1.0              excel           Reading / writing for Excel 2010 xlsx/xlsm/xltx/xltm files
-pyxlsb                    1.0.10             excel           Reading for xlsb files
-python-calamine           0.1.7              excel           Reading for xls/xlsx/xlsm/xlsb/xla/xlam/ods files
-odfpy                     1.4.1              excel           Reading / writing for OpenDocument 1.2 files
-========================= ================== =============== =============================================================
+================================================================== ================== =============== =============================================================
+Dependency                                                         Minimum Version    pip extra       Notes
+================================================================== ================== =============== =============================================================
+`xlrd <https://github.com/python-excel/xlrd>`__                    2.0.1              excel           Reading for xls files
+`xlsxwriter <https://github.com/jmcnamara/XlsxWriter>`__           3.0.5              excel           Writing for xlsx files
+`openpyxl <https://github.com/theorchard/openpyxl>`__              3.1.0              excel           Reading / writing for Excel 2010 xlsx/xlsm/xltx/xltm files
+`pyxlsb <https://github.com/willtrnr/pyxlsb>`__                    1.0.10             excel           Reading for xlsb files
+`python-calamine <https://github.com/dimastbk/python-calamine>`__  0.1.7              excel           Reading for xls/xlsx/xlsm/xlsb/xla/xlam/ods files
+`odfpy <https://github.com/eea/odfpy>`__                           1.4.1              excel           Reading / writing for OpenDocument 1.2 files
+================================================================== ================== =============== =============================================================
 
 HTML
 ^^^^
 
 Installable with ``pip install "pandas[html]"``.
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-BeautifulSoup4            4.11.2             html            HTML parser for read_html
-html5lib                  1.1                html            HTML parser for read_html
-lxml                      4.9.2              html            HTML parser for read_html
-========================= ================== =============== =============================================================
+=============================================================== ================== =============== ==========================
+Dependency                                                      Minimum Version    pip extra       Notes
+=============================================================== ================== =============== ==========================
+`BeautifulSoup4 <https://github.com/wention/BeautifulSoup4>`__  4.11.2             html            HTML parser for read_html
+`html5lib <https://github.com/html5lib/html5lib-python>`__      1.1                html            HTML parser for read_html
+`lxml <https://github.com/lxml/lxml>`__                         4.9.2              html            HTML parser for read_html
+=============================================================== ================== =============== ==========================
 
 One of the following combinations of libraries is needed to use the
 top-level :func:`~pandas.read_html` function:
@@ -273,45 +273,45 @@ XML
 
 Installable with ``pip install "pandas[xml]"``.
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-lxml                      4.9.2              xml             XML parser for read_xml and tree builder for to_xml
-========================= ================== =============== =============================================================
+======================================== ================== =============== ====================================================
+Dependency                               Minimum Version    pip extra       Notes
+======================================== ================== =============== ====================================================
+`lxml <https://github.com/lxml/lxml>`__  4.9.2              xml             XML parser for read_xml and tree builder for to_xml
+======================================== ================== =============== ====================================================
 
 SQL databases
 ^^^^^^^^^^^^^
 
 Traditional drivers are installable with ``pip install "pandas[postgresql, mysql, sql-other]"``
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-SQLAlchemy                2.0.0              postgresql,     SQL support for databases other than sqlite
-                                             mysql,
-                                             sql-other
-psycopg2                  2.9.6              postgresql      PostgreSQL engine for sqlalchemy
-pymysql                   1.0.2              mysql           MySQL engine for sqlalchemy
-adbc-driver-postgresql    0.10.0             postgresql      ADBC Driver for PostgreSQL
-adbc-driver-sqlite        0.8.0              sql-other       ADBC Driver for SQLite
-========================= ================== =============== =============================================================
+================================================================== ================== =============== ============================================
+Dependency                                                         Minimum Version    pip extra       Notes
+================================================================== ================== =============== ============================================
+`SQLAlchemy <https://github.com/sqlalchemy/sqlalchemy>`__          2.0.0              postgresql,     SQL support for databases other than sqlite
+                                                                                      mysql,
+                                                                                      sql-other
+`psycopg2 <https://github.com/psycopg/psycopg2>`__                 2.9.6              postgresql      PostgreSQL engine for sqlalchemy
+`pymysql <https://github.com/PyMySQL/PyMySQL>`__                   1.0.2              mysql           MySQL engine for sqlalchemy
+`adbc-driver-postgresql <https://github.com/apache/arrow-adbc>`__  0.10.0             postgresql      ADBC Driver for PostgreSQL
+`adbc-driver-sqlite <https://github.com/apache/arrow-adbc>`__      0.8.0              sql-other       ADBC Driver for SQLite
+================================================================== ================== =============== ============================================
 
 Other data sources
 ^^^^^^^^^^^^^^^^^^
 
 Installable with ``pip install "pandas[hdf5, parquet, feather, spss, excel]"``
 
-========================= ================== ================ =============================================================
-Dependency                Minimum Version    pip extra        Notes
-========================= ================== ================ =============================================================
-PyTables                  3.8.0              hdf5             HDF5-based reading / writing
-blosc                     1.21.3             hdf5             Compression for HDF5; only available on ``conda``
-zlib                                         hdf5             Compression for HDF5
-fastparquet               2023.10.0          -                Parquet reading / writing (pyarrow is default)
-pyarrow                   10.0.1             parquet, feather Parquet, ORC, and feather reading / writing
-pyreadstat                1.2.0              spss             SPSS files (.sav) reading
-odfpy                     1.4.1              excel            Open document format (.odf, .ods, .odt) reading / writing
-========================= ================== ================ =============================================================
+====================================================== ================== ================ ==========================================================
+Dependency                                             Minimum Version    pip extra        Notes
+====================================================== ================== ================ ==========================================================
+`PyTables <https://github.com/PyTables/PyTables>`__    3.8.0              hdf5             HDF5-based reading / writing
+`blosc <https://github.com/Blosc/c-blosc>`__           1.21.3             hdf5             Compression for HDF5; only available on ``conda``
+`zlib <https://github.com/madler/zlib>`__                                 hdf5             Compression for HDF5
+`fastparquet <https://github.com/dask/fastparquet>`__  2023.10.0          -                Parquet reading / writing (pyarrow is default)
+`pyarrow <https://github.com/apache/arrow>`__          10.0.1             parquet, feather Parquet, ORC, and feather reading / writing
+`pyreadstat <https://github.com/Roche/pyreadstat>`__   1.2.0              spss             SPSS files (.sav) reading
+`odfpy <https://github.com/eea/odfpy>`__               1.4.1              excel            Open document format (.odf, .ods, .odt) reading / writing
+====================================================== ================== ================ ==========================================================
 
 .. _install.warn_orc:
 
@@ -326,26 +326,26 @@ Access data in the cloud
 
 Installable with ``pip install "pandas[fss, aws, gcp]"``
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-fsspec                    2022.11.0          fss, gcp, aws   Handling files aside from simple local and HTTP (required
-                                                             dependency of s3fs, gcsfs).
-gcsfs                     2022.11.0          gcp             Google Cloud Storage access
-s3fs                      2022.11.0          aws             Amazon S3 access
-========================= ================== =============== =============================================================
+============================================ ================== =============== ==========================================================
+Dependency                                   Minimum Version    pip extra       Notes
+============================================ ================== =============== ==========================================================
+`fsspec <https://github.com/fsspec>`__       2022.11.0          fss, gcp, aws   Handling files aside from simple local and HTTP (required
+                                                                                dependency of s3fs, gcsfs).
+`gcsfs <https://github.com/fsspec/gcsfs>`__  2022.11.0          gcp             Google Cloud Storage access
+`s3fs <https://github.com/fsspec/s3fs>`__    2022.11.0          aws             Amazon S3 access
+============================================ ================== =============== ==========================================================
 
 Clipboard
 ^^^^^^^^^
 
 Installable with ``pip install "pandas[clipboard]"``.
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-PyQt4/PyQt5               5.15.9             clipboard       Clipboard I/O
-qtpy                      2.3.0              clipboard       Clipboard I/O
-========================= ================== =============== =============================================================
+======================================================================================== ================== =============== ==============
+Dependency                                                                               Minimum Version    pip extra       Notes
+======================================================================================== ================== =============== ==============
+`PyQt4 <https://pypi.org/project/PyQt4/>`__/`PyQt5 <https://pypi.org/project/PyQt5/>`__  5.15.9             clipboard       Clipboard I/O
+`qtpy <https://github.com/spyder-ide/qtpy>`__                                            2.3.0              clipboard       Clipboard I/O
+======================================================================================== ================== =============== ==============
 
 .. note::
 
@@ -358,19 +358,19 @@ Compression
 
 Installable with ``pip install "pandas[compression]"``
 
-========================= ================== =============== =============================================================
-Dependency                Minimum Version    pip extra       Notes
-========================= ================== =============== =============================================================
-Zstandard                 0.19.0             compression     Zstandard compression
-========================= ================== =============== =============================================================
+================================================= ================== =============== ======================
+Dependency                                        Minimum Version    pip extra       Notes
+================================================= ================== =============== ======================
+`Zstandard <https://github.com/facebook/zstd>`__  0.19.0             compression     Zstandard compression
+================================================= ================== =============== ======================
 
 Timezone
 ^^^^^^^^
 
 Installable with ``pip install "pandas[timezone]"``
 
-========================= ================== =================== =============================================================
-Dependency                Minimum Version    pip extra           Notes
-========================= ================== =================== =============================================================
-pytz                      2023.4             timezone            Alternative timezone library to ``zoneinfo``.
-========================= ================== =================== =============================================================
+========================================== ================== =================== ==============================================
+Dependency                                 Minimum Version    pip extra           Notes
+========================================== ================== =================== ==============================================
+`pytz <https://github.com/stub42/pytz>`__  2023.4             timezone            Alternative timezone library to ``zoneinfo``.
+========================================== ================== =================== ==============================================
diff --git a/doc/source/whatsnew/v3.0.0.rst b/doc/source/whatsnew/v3.0.0.rst
index 4bd31de185..e74bd2f745 100644
--- a/doc/source/whatsnew/v3.0.0.rst
+++ b/doc/source/whatsnew/v3.0.0.rst
@@ -667,7 +667,7 @@ Indexing
 ^^^^^^^^
 - Bug in :meth:`DataFrame.__getitem__` returning modified columns when called with ``slice`` in Python 3.12 (:issue:`57500`)
 - Bug in :meth:`DataFrame.from_records` throwing a ``ValueError`` when passed an empty list in ``index`` (:issue:`58594`)
--
+- Bug in printing :attr:`Index.names` and :attr:`MultiIndex.levels` would not escape single quotes (:issue:`60190`)
 
 Missing
 ^^^^^^^
diff --git a/pandas/_config/config.py b/pandas/_config/config.py
index 1d57aa806e..35139979f9 100644
--- a/pandas/_config/config.py
+++ b/pandas/_config/config.py
@@ -188,6 +188,11 @@ def set_option(*args) -> None:
     """
     Set the value of the specified option or options.
 
+    This method allows fine-grained control over the behavior and display settings
+    of pandas. Options affect various functionalities such as output formatting,
+    display limits, and operational behavior. Settings can be modified at runtime
+    without requiring changes to global configurations or environment variables.
+
     Parameters
     ----------
     *args : str | object
diff --git a/pandas/core/arrays/integer.py b/pandas/core/arrays/integer.py
index f85fbd062b..afbadd754c 100644
--- a/pandas/core/arrays/integer.py
+++ b/pandas/core/arrays/integer.py
@@ -105,6 +105,12 @@ class IntegerArray(NumericArray):
     -------
     IntegerArray
 
+    See Also
+    --------
+    array : Create an array using the appropriate dtype, including ``IntegerArray``.
+    Int32Dtype : An ExtensionDtype for int32 integer data.
+    UInt16Dtype : An ExtensionDtype for uint16 integer data.
+
     Examples
     --------
     Create an IntegerArray with :func:`pandas.array`.
diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py
index ad23127ad4..48d4e0456d 100644
--- a/pandas/core/groupby/groupby.py
+++ b/pandas/core/groupby/groupby.py
@@ -515,6 +515,15 @@ class BaseGroupBy(PandasObject, SelectionMixin[NDFrameT], GroupByIndexingMixin):
         """
         Dict {group name -> group indices}.
 
+        See Also
+        --------
+        core.groupby.DataFrameGroupBy.indices : Provides a mapping of group rows to
+            positions of the elements.
+        core.groupby.SeriesGroupBy.indices : Provides a mapping of group rows to
+            positions of the elements.
+        core.resample.Resampler.indices : Provides a mapping of group rows to
+            positions of the elements.
+
         Examples
         --------
 
diff --git a/pandas/core/indexes/frozen.py b/pandas/core/indexes/frozen.py
index c559c52958..254bd71ade 100644
--- a/pandas/core/indexes/frozen.py
+++ b/pandas/core/indexes/frozen.py
@@ -110,7 +110,9 @@ class FrozenList(PandasObject, list):
         raise TypeError(f"'{type(self).__name__}' does not support mutable operations.")
 
     def __str__(self) -> str:
-        return pprint_thing(self, quote_strings=True, escape_chars=("\t", "\r", "\n"))
+        return pprint_thing(
+            self, quote_strings=True, escape_chars=("\t", "\r", "\n", "'")
+        )
 
     def __repr__(self) -> str:
         return f"{type(self).__name__}({self!s})"
diff --git a/pandas/errors/__init__.py b/pandas/errors/__init__.py
index 70d839d817..b1a338893f 100644
--- a/pandas/errors/__init__.py
+++ b/pandas/errors/__init__.py
@@ -20,6 +20,16 @@ class IntCastingNaNError(ValueError):
     """
     Exception raised when converting (``astype``) an array with NaN to an integer type.
 
+    This error occurs when attempting to cast a data structure containing non-finite
+    values (such as NaN or infinity) to an integer data type. Integer types do not
+    support non-finite values, so such conversions are explicitly disallowed to
+    prevent silent data corruption or unexpected behavior.
+
+    See Also
+    --------
+    DataFrame.astype : Method to cast a pandas DataFrame object to a specified dtype.
+    Series.astype : Method to cast a pandas Series object to a specified dtype.
+
     Examples
     --------
     >>> pd.DataFrame(np.array([[1, np.nan], [2, 3]]), dtype="i8")
diff --git a/pandas/io/formats/printing.py b/pandas/io/formats/printing.py
index 67b5eb6f5e..a9936ba8c8 100644
--- a/pandas/io/formats/printing.py
+++ b/pandas/io/formats/printing.py
@@ -203,7 +203,7 @@ def pprint_thing(
     def as_escaped_string(
         thing: Any, escape_chars: EscapeChars | None = escape_chars
     ) -> str:
-        translate = {"\t": r"\t", "\n": r"\n", "\r": r"\r"}
+        translate = {"\t": r"\t", "\n": r"\n", "\r": r"\r", "'": r"\'"}
         if isinstance(escape_chars, Mapping):
             if default_escapes:
                 translate.update(escape_chars)
diff --git a/pandas/io/stata.py b/pandas/io/stata.py
index ed89d5766c..63f729c834 100644
--- a/pandas/io/stata.py
+++ b/pandas/io/stata.py
@@ -2748,6 +2748,18 @@ supported types."""
         """
         Export DataFrame object to Stata dta format.
 
+        This method writes the contents of a pandas DataFrame to a `.dta` file
+        compatible with Stata. It includes features for handling value labels,
+        variable types, and metadata like timestamps and data labels. The output
+        file can then be read and used in Stata or other compatible statistical
+        tools.
+
+        See Also
+        --------
+        read_stata : Read Stata file into DataFrame.
+        DataFrame.to_stata : Export DataFrame object to Stata dta format.
+        io.stata.StataWriter : A class for writing Stata binary dta files.
+
         Examples
         --------
         >>> df = pd.DataFrame(
diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py
index 534bee5fed..9a01568971 100644
--- a/pandas/tseries/frequencies.py
+++ b/pandas/tseries/frequencies.py
@@ -89,6 +89,11 @@ def infer_freq(
     """
     Infer the most likely frequency given the input index.
 
+    This method attempts to deduce the most probable frequency (e.g., 'D' for daily,
+    'H' for hourly) from a sequence of datetime-like objects. It is particularly useful
+    when the frequency of a time series is not explicitly set or known but can be
+    inferred from its values.
+
     Parameters
     ----------
     index : DatetimeIndex, TimedeltaIndex, Series or array-like
@@ -106,6 +111,13 @@ def infer_freq(
     ValueError
         If there are fewer than three values.
 
+    See Also
+    --------
+    date_range : Return a fixed frequency DatetimeIndex.
+    timedelta_range : Return a fixed frequency TimedeltaIndex with day as the default.
+    period_range : Return a fixed frequency PeriodIndex.
+    DatetimeIndex.freq : Return the frequency object if it is set, otherwise None.
+
     Examples
     --------
     >>> idx = pd.date_range(start="2020/12/01", end="2020/12/30", periods=30)


Test patch:
diff --git a/pandas/tests/io/formats/test_printing.py b/pandas/tests/io/formats/test_printing.py
index 1009dfec53..3b63011bf8 100644
--- a/pandas/tests/io/formats/test_printing.py
+++ b/pandas/tests/io/formats/test_printing.py
@@ -3,11 +3,33 @@
 from collections.abc import Mapping
 import string
 
+import pytest
+
 import pandas._config.config as cf
 
+import pandas as pd
+
 from pandas.io.formats import printing
 
 
+@pytest.mark.parametrize(
+    "input_names, expected_names",
+    [
+        (["'a b"], "['\\'a b']"),  # Escape leading quote
+        (["test's b"], "['test\\'s b']"),  # Escape apostrophe
+        (["'test' b"], "['\\'test\\' b']"),  # Escape surrounding quotes
+        (["test b'"], "['test b\\'']"),  # Escape single quote
+        (["test\n' b"], "['test\\n\\' b']"),  # Escape quotes, preserve newline
+    ],
+)
+def test_formatted_index_names(input_names, expected_names):
+    # GH#60190
+    df = pd.DataFrame({name: [1, 2, 3] for name in input_names}).set_index(input_names)
+    formatted_names = str(df.index.names)
+
+    assert formatted_names == expected_names
+
+
 def test_adjoin():
     data = [["a", "b", "c"], ["dd", "ee", "ff"], ["ggg", "hhh", "iii"]]
     expected = "a  dd  ggg\nb  ee  hhh\nc  ff  iii"