File tree 1 file changed +30
-13
lines changed
1 file changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -180,19 +180,36 @@ labeled the aggregated group with the end of the interval: the next day).
180
180
DataFrame constructor with no columns specified. The v0.9.0 behavior (names
181
181
``X0 ``, ``X1 ``, ...) can be reproduced by specifying ``prefix='X' ``:
182
182
183
- .. ipython :: python
184
- :okexcept:
185
-
186
- import io
187
-
188
- data = """
189
- a,b,c
190
- 1,Yes,2
191
- 3,No,4
192
- """
193
- print (data)
194
- pd.read_csv(io.StringIO(data), header = None )
195
- pd.read_csv(io.StringIO(data), header = None , prefix = " X" )
183
+ .. code-block :: ipython
184
+
185
+ In [6]: import io
186
+
187
+ In [7]: data = """
188
+ ...: a,b,c
189
+ ...: 1,Yes,2
190
+ ...: 3,No,4
191
+ ...: """
192
+ ...:
193
+
194
+ In [8]: print(data)
195
+
196
+ a,b,c
197
+ 1,Yes,2
198
+ 3,No,4
199
+
200
+ In [9]: pd.read_csv(io.StringIO(data), header=None)
201
+ Out[9]:
202
+ 0 1 2
203
+ 0 a b c
204
+ 1 1 Yes 2
205
+ 2 3 No 4
206
+
207
+ In [10]: pd.read_csv(io.StringIO(data), header=None, prefix="X")
208
+ Out[10]:
209
+ X0 X1 X2
210
+ 0 a b c
211
+ 1 1 Yes 2
212
+ 2 3 No 4
196
213
197
214
- Values like ``'Yes' `` and ``'No' `` are not interpreted as boolean by default,
198
215
though this can be controlled by new ``true_values `` and ``false_values ``
You can’t perform that action at this time.
0 commit comments