@@ -53,16 +53,16 @@ for much more on how to use an ``Index`` effectively.
53
53
54
54
55
55
Copies vs. in place operations
56
- -----------------------------
56
+ ------------------------------
57
57
58
58
.. include :: includes/copies.rst
59
59
60
60
61
61
Data input / output
62
- ------------------
62
+ -------------------
63
63
64
64
Reading external data
65
- ~~~~~~~~~~~~~~~~~~~~
65
+ ~~~~~~~~~~~~~~~~~~~~~
66
66
67
67
Like SPSS, pandas provides utilities for reading in data from many formats. The ``tips `` dataset, found within
68
68
the pandas tests (`csv <https://raw.githubusercontent.com/pandas-dev/pandas/main/pandas/tests/io/data/csv/tips.csv >`_)
@@ -96,7 +96,7 @@ For example, if the data was instead tab delimited, and did not have column name
96
96
.. code-block :: python
97
97
98
98
tips = pd.read_csv(" tips.csv" , sep = " \t " , header = None )
99
-
99
+
100
100
# alternatively, read_table is an alias to read_csv with tab delimiter
101
101
tips = pd.read_table(" tips.csv" , header = None )
102
102
@@ -139,10 +139,10 @@ In pandas, this would be written as:
139
139
140
140
141
141
String processing
142
- ----------------
142
+ -----------------
143
143
144
144
Finding length of string
145
- ~~~~~~~~~~~~~~~~~~~~~~~
145
+ ~~~~~~~~~~~~~~~~~~~~~~~~
146
146
147
147
In SPSS:
148
148
@@ -155,7 +155,7 @@ In SPSS:
155
155
156
156
157
157
Changing case
158
- ~~~~~~~~~~~~
158
+ ~~~~~~~~~~~~~
159
159
160
160
In SPSS:
161
161
@@ -178,10 +178,10 @@ In SPSS, merging data files is done through Data > Merge Files.
178
178
179
179
180
180
GroupBy operations
181
- ----------------
181
+ ------------------
182
182
183
183
Split-file processing
184
- ~~~~~~~~~~~~~~~~~~~
184
+ ~~~~~~~~~~~~~~~~~~~~~
185
185
186
186
In SPSS, split-file analysis is done through Data > Split File:
187
187
@@ -200,7 +200,7 @@ The pandas equivalent would be:
200
200
201
201
202
202
Missing data
203
- -----------
203
+ ------------
204
204
205
205
SPSS uses the period (``. ``) for numeric missing values and blank spaces for string missing values.
206
206
pandas uses ``NaN `` (Not a Number) for numeric missing values and ``None `` or ``NaN `` for string
@@ -210,10 +210,10 @@ missing values.
210
210
211
211
212
212
Other considerations
213
- ------------------
213
+ --------------------
214
214
215
215
Output management
216
- ~~~~~~~~~~~~~~~
216
+ -----------------
217
217
218
218
While pandas does not have a direct equivalent to SPSS's Output Management System (OMS), you can
219
219
capture and export results in various ways:
0 commit comments