Skip to content

Commit 8bb0270

Browse files
committed
Episode 03: fix python code blocks
1 parent afea9db commit 8bb0270

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

_episodes/03-index-slice-subset.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,13 @@ surveys_df.iloc[0:3, 1:4]
273273
274274
which gives the **output**
275275
276-
```
276+
~~~
277277
month day year
278278
0 7 16 1977
279279
1 7 16 1977
280280
2 7 16 1977
281-
```
281+
~~~
282+
>> {: .output}
282283
283284
Notice that we asked for a slice from 0:3. This yielded 3 rows of data. When you
284285
ask for 0:3, you are actually telling Python to start at index 0 and select rows
@@ -324,9 +325,10 @@ surveys_df.iloc[2, 6]
324325
325326
gives the **output**
326327
327-
```
328+
~~~
328329
'F'
329-
```
330+
~~~
331+
>> {: .output}
330332
331333
Remember that Python indexing begins at 0. So, the index location [2, 6]
332334
selects the element that is 3 rows down and 7 columns over in the DataFrame.

0 commit comments

Comments
 (0)