Skip to content

Commit

Permalink
fix: pg.mean no longer works on string columns by default
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbraun committed Apr 22, 2024
1 parent ac143d5 commit f3943d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ If I were using Windows, it might look like this:
Set these aside for now and we'll pick them up in chapter 2.

## Changelog
### v0.1.1 (2024-04-22)
Fix Pandas `mean` example. More: Pandas changed their defaults to throw an
error if you try to call this on string columns. Fixed example to explicitely
only call it on numeric data.

### v0.1.0 (2024-04-16)
Change scraping example to get data from worldfootball.net, since
myfootballfacts.com was no longer working.
Expand Down
4 changes: 2 additions & 2 deletions code/03_02_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

# book picks up here:

pg.mean()
pg.max()
pg[['shot', 'goal', 'assist', 'pass', 'throw', 'corner']].mean()
pg[['name', 'shot', 'goal', 'assist', 'pass', 'throw', 'corner']].max()

# Axis
pg[['shot', 'goal', 'assist', 'pass']].mean(axis=0)
Expand Down

0 comments on commit f3943d2

Please sign in to comment.