Skip to content

Commit 0fb6a57

Browse files
authored
Update analyze-baseball-stats-with-pandas-and-matplotlib.mdx
1 parent 03a383d commit 0fb6a57

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

projects/analyze-baseball-stats-with-pandas-and-matplotlib/analyze-baseball-stats-with-pandas-and-matplotlib.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ As a brief example, this is what the top of the **Batting.csv** file looks like:
5252

5353
Each row represents the batting information for a player for a given year. For example, the first row shows that the player with the ID of `aardsda01` only played in 11 games in 2004 and had no hits or runs!
5454

55-
When looking at new data, it can also be helpful to look for the official data dictionary for the dataset. It can often be hard to interpret column names - for example, if you're not a baseball fan, you might not know what the column `AB` represents. Looking at the documentation file can help clear up any questions. In this case, we can look at **readme2025.txt** to learn that `AB` is "At Bats" (the number of times the player was up to the plate).
55+
When looking at new data, it can also be helpful to look for the official data dictionary for the dataset. It can often be hard to interpret column names for example, if you're not a baseball fan, you might not know what the column `AB` represents. Looking at the documentation file can help clear up any questions. In this case, we can look at **readme2025.txt** to learn that `AB` is "At Bats" (the number of times the player was up to the plate).
5656

5757
So with all of that setup out of the way, let's start diving into some data analysis!
5858

@@ -66,9 +66,9 @@ Let's answer questions like:
6666
- _What years are covered?_
6767
- _What is the average number of runs a player scores in a single year?_
6868

69-
To begin, we'll load the players dataset into Pandas. To do so, first download the Dataset and save it into the same directory as your Python script.
69+
To begin, we'll load the players dataset into Pandas. To do so, first download the dataset and save it into the same directory as your Python script.
7070

71-
Then, we can simply use `pd.read_csv('Batting.csv')` to get our DataFrame:
71+
Then, we can simply use `pd.read_csv()` to get our DataFrame:
7272

7373
```py
7474
import pandas as pd

0 commit comments

Comments
 (0)