Baseball Data#
Major League Baseball Data from the 1986 and 1987 seasons.
AtBat
: Number of times at bat in 1986Hits
: Number of hits in 1986HmRun
: Number of home runs in 1986Runs
: Number of runs in 1986RBI
: Number of runs batted in in 1986Walks
: Number of walks in 1986Years
: Number of years in the major leaguesCAtBat
: Number of times at bat during his careerCHits
: Number of hits during his careerCHmRun
: Number of home runs during his careerCRuns
: Number of runs during his careerCRBI
: Number of runs batted in during his careerCWalks
: Number of walks during his careerLeague
: A factor with levels A and N indicating player’s league at the end of 1986Division
: A factor with levels E and W indicating player’s division at the end of 1986PutOuts
: Number of put outs in 1986Assists
: Number of assists in 1986Errors
: Number of errors in 1986Salary
: 1987 annual salary on opening day in thousands of dollarsNewLeague
: A factor with levels A and N indicating player’s league at the beginning of 1987
Notes#
This dataset was taken from the StatLib library which is maintained at Carnegie Mellon University. This is part of the data that was used in the 1988 ASA Graphics Section Poster Session. The salary data were originally from Sports Illustrated, April 20, 1987. The 1986 and career statistics were obtained from The 1987 Baseball Encyclopedia Update published by Collier Books, Macmillan Publishing Company, New York.
from ISLP import load_data
Hitters = load_data('Hitters')
Hitters.columns
Index(['AtBat', 'Hits', 'HmRun', 'Runs', 'RBI', 'Walks', 'Years', 'CAtBat',
'CHits', 'CHmRun', 'CRuns', 'CRBI', 'CWalks', 'League', 'Division',
'PutOuts', 'Assists', 'Errors', 'Salary', 'NewLeague'],
dtype='object')
Hitters.shape
(322, 20)
Hitters.columns
Index(['AtBat', 'Hits', 'HmRun', 'Runs', 'RBI', 'Walks', 'Years', 'CAtBat',
'CHits', 'CHmRun', 'CRuns', 'CRBI', 'CWalks', 'League', 'Division',
'PutOuts', 'Assists', 'Errors', 'Salary', 'NewLeague'],
dtype='object')
Hitters.describe().iloc[:,:4]
AtBat | Hits | HmRun | Runs | |
---|---|---|---|---|
count | 322.000000 | 322.000000 | 322.000000 | 322.000000 |
mean | 380.928571 | 101.024845 | 10.770186 | 50.909938 |
std | 153.404981 | 46.454741 | 8.709037 | 26.024095 |
min | 16.000000 | 1.000000 | 0.000000 | 0.000000 |
25% | 255.250000 | 64.000000 | 4.000000 | 30.250000 |
50% | 379.500000 | 96.000000 | 8.000000 | 48.000000 |
75% | 512.000000 | 137.000000 | 16.000000 | 69.000000 |
max | 687.000000 | 238.000000 | 40.000000 | 130.000000 |