Skip to content

Commit

Permalink
Update the_index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor-phil committed Nov 1, 2024
1 parent 1baa256 commit 768598b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lectures/pandas/the_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ This would be helpful, for example, if we wanted to compute the difference
in the average of all our variables from one year to the next.

```{code-cell} python
df_year.loc[2009].mean() - df_year.loc[2008].mean()
df_year.loc[2009].mean(numeric_only=True) - df_year.loc[2008].mean(numeric_only=True)
```

Notice that pandas did a few things for us.
Expand Down

0 comments on commit 768598b

Please sign in to comment.