Skip to content

Commit 1fda035

Browse files
authored
Fix typos in course.
1 parent eb71226 commit 1fda035

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

2-Working-With-Data/07-python/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ b = pd.Series(["I","like","to","play","games","and","will","not","change"],index
9797
df = pd.DataFrame([a,b])
9898
```
9999
This will create a horizontal table like this:
100+
100101
| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
101102
| --- | --- | ---- | --- | --- | ------ | --- | ------ | ---- | ---- |
102103
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
@@ -122,7 +123,7 @@ This will give us a table like this:
122123

123124
**Note** that we can also get this table layout by transposing the previous table, eg. by writing
124125
```python
125-
df = pd.DataFrame([a,b]).T..rename(columns={ 0 : 'A', 1 : 'B' })
126+
df = pd.DataFrame([a,b]).T.rename(columns={ 0 : 'A', 1 : 'B' })
126127
```
127128
Here `.T` means the operation of transposing the DataFrame, i.e. changing rows and columns, and `rename` operation allows us to rename columns to match the previous example.
128129

0 commit comments

Comments
 (0)