Skip to content

Commit 97509e9

Browse files
cbrnrsimonjayhawkins
authored andcommitted
Slightly rephrase SPSS doc (#27754)
1 parent 7d8eeff commit 97509e9

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

doc/source/user_guide/io.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5491,30 +5491,29 @@ The top-level function :func:`read_spss` can read (but not write) SPSS
54915491
`sav` (.sav) and `zsav` (.zsav) format files.
54925492

54935493
SPSS files contain column names. By default the
5494-
whole file is read, categorical columns are converted into ``pd.Categorical``
5494+
whole file is read, categorical columns are converted into ``pd.Categorical``,
54955495
and a ``DataFrame`` with all columns is returned.
54965496

5497-
Specify a ``usecols`` to obtain a subset of columns. Specify ``convert_categoricals=False``
5497+
Specify the ``usecols`` parameter to obtain a subset of columns. Specify ``convert_categoricals=False``
54985498
to avoid converting categorical columns into ``pd.Categorical``.
54995499

5500-
Read a spss file:
5500+
Read an SPSS file:
55015501

55025502
.. code-block:: python
55035503
5504-
df = pd.read_spss('spss_data.zsav')
5504+
df = pd.read_spss('spss_data.sav')
55055505
5506-
Extract a subset of columns ``usecols`` from SPSS file and
5506+
Extract a subset of columns contained in ``usecols`` from an SPSS file and
55075507
avoid converting categorical columns into ``pd.Categorical``:
55085508

55095509
.. code-block:: python
55105510
5511-
df = pd.read_spss('spss_data.zsav', usecols=['foo', 'bar'],
5511+
df = pd.read_spss('spss_data.sav', usecols=['foo', 'bar'],
55125512
convert_categoricals=False)
55135513
5514-
More info_ about the sav and zsav file format is available from the IBM
5515-
web site.
5514+
More information about the `sav` and `zsav` file format is available here_.
55165515

5517-
.. _info: https://www.ibm.com/support/knowledgecenter/en/SSLVMB_22.0.0/com.ibm.spss.statistics.help/spss/base/savedatatypes.htm
5516+
.. _here: https://www.ibm.com/support/knowledgecenter/en/SSLVMB_22.0.0/com.ibm.spss.statistics.help/spss/base/savedatatypes.htm
55185517

55195518
.. _io.other:
55205519

0 commit comments

Comments
 (0)