Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbraun committed Mar 23, 2023
1 parent 843c778 commit a5d6d68
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ 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.0.6 (2023-03-23)
Fix some misc typos, mostly in end of chapter problems (thanks again Emil!).

### v0.0.4 (2023-03-03)
Fix some misc other sport references (thanks Emil!).

Expand Down
2 changes: 1 addition & 1 deletion code/03_01_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
def is_e_metro(team):
"""
Takes some string named team ('WSH', 'CHI' etc) and checks whether they're in
the Metropolis division.
the Metropolitan division.
"""
return team in ['WSH', 'NYI', 'PIT', 'CAR', 'CBJ', 'PHI', 'NYR', 'NJD']

Expand Down
10 changes: 6 additions & 4 deletions solutions-to-exercises/03_pandas_answers.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@
# flags ALL dups (not just 2nd) because passing keep=False
dups = dfp[['team', 'birth_city', 'birth_state_prov']].duplicated(keep=False)

dftg_fg_dup = dfp.loc[dups]
dftg_fg_no_dup = dfp.loc[~dups]
dfp_dups = dfp.loc[dups]
dfp_nodups = dfp.loc[~dups]

#######
# 3.3.5
Expand Down Expand Up @@ -312,8 +312,10 @@
"""
Count counts the number of non missing (non `np.nan`) values. This is different
than `sum` which adds up the values in all of the columns. The only time
`count` and `sum` would return the same thing is if you had a column filled
with 1s without any missing values.
`count` and `sum` would reliably return the same thing is if you had a column
filled with 1s without any missing values.
We want to use count. Sum doesn't make any sense.
"""

#######
Expand Down

0 comments on commit a5d6d68

Please sign in to comment.