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
22.45k stars 4.19k forks source link

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

Open yssickjgd opened 4 months ago

yssickjgd commented 4 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.