Errata

Python for Excel

Errata for Python for Excel

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 113
In [88] and [89]

I'm using Python 3.11.2 and testing this in the debug console of Visual Studio Code. I could not get

In [88]: df.groupby(["continent"]).mean()
and
In [89]: df.groupby(["continent", "country")].mean()

to work. It would throw the following error.

TypeError: Could not convert string 'JohnTim' to numeric.

I was able to get the lines below to work though. I'm wondering if this is just an issue running the code in Visual Studio Code?

In [88_]: df.groupby(["continent"])[["age", "score"]].mean()
in [89_]: df.groupby(["continent", "country"])[["age", "score"]].mean()

Anonymous  Feb 07, 2024 
Printed Page 269
Above Figure 12-9

Problem on page 269
I’m getting an error when I call the plot function “=plot(A4#, “History”)”.
The error message is very long, it begins as follows:
“AttributeError: Range.CLSID raise AttributeError("%s.%s" % (self._username_, attr))”.
Entering “=plot(A4:F263,"History”)” instead gives the same error.
The earlier function call “=get_interest_over_time(B3:F3,B1,D1)” on p.266 worked OK, so the file “google_trends.py” is being accessed successfully and data is being stored in Excel.
Thanks for any help you can give me. My version of Python is 3.11.4

Anonymous  Dec 04, 2023