44
55Comparison with SPSS
66********************
7- For potential users coming from `SPSS <https://www.ibm.com/spss >`__, this page is meant to demonstrate
7+ For potential users coming from `SPSS <https://www.ibm.com/spss >`__, this page is meant to demonstrate
88how various SPSS operations would be performed using pandas.
99
1010.. include :: includes/introduction.rst
@@ -20,7 +20,7 @@ General terminology translation
2020 :widths: 20, 20
2121
2222 ``DataFrame ``, data file
23- column, variable
23+ column, variable
2424 row, case
2525 groupby, split file
2626 ``NaN ``, system-missing
@@ -29,7 +29,7 @@ General terminology translation
2929~~~~~~~~~~~~~
3030
3131A ``DataFrame `` in pandas is analogous to an SPSS data file - a two-dimensional
32- data source with labeled columns that can be of different types. As will be shown in this
32+ data source with labeled columns that can be of different types. As will be shown in this
3333document, almost any operation that can be performed in SPSS can also be accomplished in pandas.
3434
3535``Series ``
@@ -42,13 +42,13 @@ to working with a variable in SPSS.
4242``Index ``
4343~~~~~~~~~
4444
45- Every ``DataFrame `` and ``Series `` has an ``Index `` -- labels on the *rows * of the data. SPSS does not
46- have an exact analogue, as cases are simply numbered sequentially from 1. In pandas, if no index is
45+ Every ``DataFrame `` and ``Series `` has an ``Index `` -- labels on the *rows * of the data. SPSS does not
46+ have an exact analogue, as cases are simply numbered sequentially from 1. In pandas, if no index is
4747specified, a ``RangeIndex `` is used by default (first row = 0, second row = 1, and so on).
4848
49- While using a labeled ``Index `` or ``MultiIndex `` can enable sophisticated analyses and is ultimately an
50- important part of pandas to understand, for this comparison we will essentially ignore the ``Index `` and
51- just treat the ``DataFrame `` as a collection of columns. Please see the :ref: `indexing documentation<indexing> `
49+ While using a labeled ``Index `` or ``MultiIndex `` can enable sophisticated analyses and is ultimately an
50+ important part of pandas to understand, for this comparison we will essentially ignore the ``Index `` and
51+ just treat the ``DataFrame `` as a collection of columns. Please see the :ref: `indexing documentation<indexing> `
5252for much more on how to use an ``Index `` effectively.
5353
5454
@@ -64,7 +64,7 @@ Data input / output
6464Reading external data
6565~~~~~~~~~~~~~~~~~~~~
6666
67- Like SPSS, pandas provides utilities for reading in data from many formats. The ``tips `` dataset, found within
67+ Like SPSS, pandas provides utilities for reading in data from many formats. The ``tips `` dataset, found within
6868the pandas tests (`csv <https://raw.githubusercontent.com/pandas-dev/pandas/main/pandas/tests/io/data/csv/tips.csv >`_)
6969will be used in many of the following examples.
7070
@@ -226,4 +226,4 @@ capture and export results in various ways:
226226 # Save multiple results to Excel sheets
227227 with pd.ExcelWriter(' results.xlsx' ) as writer:
228228 tips.describe().to_excel(writer, sheet_name = ' Descriptives' )
229- tips.groupby(' sex' ).mean().to_excel(writer, sheet_name = ' Means by Gender' )
229+ tips.groupby(' sex' ).mean().to_excel(writer, sheet_name = ' Means by Gender' )
0 commit comments