File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ labeled the aggregated group with the end of the interval: the next day).
181
181
``X0 ``, ``X1 ``, ...) can be reproduced by specifying ``prefix='X' ``:
182
182
183
183
.. ipython :: python
184
+ :okwarning:
184
185
185
186
import io
186
187
@@ -197,11 +198,25 @@ labeled the aggregated group with the end of the interval: the next day).
197
198
though this can be controlled by new ``true_values `` and ``false_values ``
198
199
arguments:
199
200
200
- .. ipython :: python
201
+ .. code-block :: ipython
201
202
202
- print (data)
203
- pd.read_csv(io.StringIO(data))
204
- pd.read_csv(io.StringIO(data), true_values = [" Yes" ], false_values = [" No" ])
203
+ In [4]: print(data)
204
+
205
+ a,b,c
206
+ 1,Yes,2
207
+ 3,No,4
208
+
209
+ In [5]: pd.read_csv(io.StringIO(data))
210
+ Out[5]:
211
+ a b c
212
+ 0 1 Yes 2
213
+ 1 3 No 4
214
+
215
+ In [6]: pd.read_csv(io.StringIO(data), true_values=["Yes"], false_values=["No"])
216
+ Out[6]:
217
+ a b c
218
+ 0 1 True 2
219
+ 1 3 False 4
205
220
206
221
- The file parsers will not recognize non-string values arising from a
207
222
converter function as NA if passed in the ``na_values `` argument. It's better
You can’t perform that action at this time.
0 commit comments