Skip to content

Commit ca97b09

Browse files
committed
update error related contents
1 parent ce54bd6 commit ca97b09

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/module4/slides/module4_18.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Detailed traceback:
134134
```
135135

136136
```out
137-
TypeError: unsupported operand type(s) for -: 'str' and 'str'
137+
TypeError: unsupported operand type(s) for /: 'str' and 'str'
138138
139139
Detailed traceback:
140140
File "<string>", line 1, in <module>

modules/module4/slides/module4_21.qmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ cereal['mfr_type'].mean()
118118
```
119119

120120
```out
121-
TypeError: Could not convert N-ColdQ-ColdK-ColdK-ColdR-ColdG-ColdK-ColdG-ColdR-ColdP-ColdQ-ColdG-ColdG-ColdG-ColdG-ColdR-ColdK-ColdK-ColdG-ColdK-ColdN-HotK-ColdG-ColdR-ColdK-ColdK-ColdK-ColdP-ColdK-ColdP-ColdP-ColdG-ColdP-ColdP-ColdP-ColdQ-ColdG-ColdP-ColdK-ColdK-ColdG-ColdQ-ColdG-ColdA-HotR-ColdR-ColdK-ColdG-ColdK-ColdK-ColdK-ColdG-ColdP-ColdK-ColdQ-ColdQ-ColdQ-ColdQ-HotK-ColdG-ColdK-ColdR-ColdK-ColdN-ColdN-ColdN-ColdK-ColdK-ColdN-ColdG-ColdG-ColdG-ColdG-ColdG-ColdR-ColdG-ColdG-Cold to numeric
121+
TypeError: Could not convert 'N-ColdQ-ColdK-ColdK-ColdR-ColdG-ColdK-ColdG-ColdR-ColdP-ColdQ-ColdG-ColdG-ColdG-ColdG-ColdR-ColdK-ColdK-ColdG-ColdK-ColdN-HotK-ColdG-ColdR-ColdK-ColdK-ColdK-ColdP-ColdK-ColdP-ColdP-ColdG-ColdP-ColdP-ColdP-ColdQ-ColdG-ColdP-ColdK-ColdK-ColdG-ColdQ-ColdG-ColdA-HotR-ColdR-ColdK-ColdG-ColdK-ColdK-ColdK-ColdG-ColdP-ColdK-ColdQ-ColdQ-ColdQ-ColdQ-HotK-ColdG-ColdK-ColdR-ColdK-ColdN-ColdN-ColdN-ColdK-ColdK-ColdN-ColdG-ColdG-ColdG-ColdG-ColdG-ColdR-ColdG-ColdG-Cold' to numeric
122122
123123
Detailed traceback:
124124
File "<string>", line 1, in <module>
125-
File "/usr/local/lib/python3.8/site-packages/pandas/core/generic.py", line 11459, in stat_func
126-
return self._reduce(
125+
File "/usr/local/lib/python3.12/site-packages/pandas/core/series.py", line 6549, in mean
126+
...
127127
```
128128

129129
```{python}
@@ -195,7 +195,7 @@ cereal.loc[:, 'protein': 'carbo'].sum(axis=1)
195195

196196
```{python}
197197
cereal = cereal.assign(total_pffc=cereal.loc[:, 'protein': 'carbo'].sum(axis=1))
198-
cereal.head()
198+
cereal.head(4)
199199
```
200200

201201

0 commit comments

Comments
 (0)