d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
24.07k stars 4.38k forks source link

Update pandas.md. Adapted for higher versions of the Pandas library #2586

Open yssickjgd opened 8 months ago

yssickjgd commented 8 months ago

In older versions of the Pandas library, when the mean() method is applied to 'inputs', it would skip uncomputable types and calculate the data directly, thus ignoring any errors. However, in higher versions of the Pandas library, strict data type checking is performed, which triggers the error 'TypeError: can only concatenate str (not "int") to str'. The revised code will filter and calculate the data based on the data types, avoiding the occurrence of this error.