Errata

Python for Data Analysis

Errata for Python for Data Analysis

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 236
In [69]:

The crosstab function has been refactored between 0.13 and 0.16. See github.com/pydata/pandas/issues/6581.

In 0.16 the crosstab result is empty:

In [69] : party_counts = pd.crosstab(tips.day, tips.size)
In [70]: party_counts
Out [70]:
Empty DataFrame
Columns: []
Index: [Fri, Sat, Sun, Thur]

And breaks the generation of Figure 8-18 on page 238. Rewriting crosstab as follows appears to work in 0.13 and 0.16:

In [69] : party_counts = pd.crosstab(tips['day'], tips['size'])

Will Deakin  Aug 15, 2015