Skip to content

Commit acb6088

Browse files
authored
fixes a reference to an outdated error type (#571)
* fixes a reference to an outdated error type * reverts accidental trailing whitespace trimming * reverts accidental trailing whitespace trimming --------- Co-authored-by: Simon Stone <simon.stone@dartmouth.edu>
1 parent 728c22a commit acb6088

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

episodes/04-data-types-and-format.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ Pandas cannot convert types from float to int if the column contains NaN values.
283283

284284
## Missing Data Values - NaN
285285

286-
What happened in the last challenge activity? Notice that this throws a value error:
287-
`ValueError: Cannot convert NA to integer`. If we look at the `weight` column in the surveys
286+
What happened in the last challenge activity? Notice that this raises a casting error:
287+
`pandas.errors.IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer` (in older versions of pandas, this may be called a `ValueError` instead). If we look at the `weight` column in the surveys
288288
data we notice that there are NaN (**N**ot **a** **N**umber) values. **NaN** values are undefined
289289
values that cannot be represented mathematically. pandas, for example, will read
290290
an empty cell in a CSV or Excel sheet as `NaN`. NaNs have some desirable properties: if we

0 commit comments

Comments
 (0)