Skip to main content

Python Package for Sean Lahman's Baseball Database

Project description

pylahman

pylahman is a Python package for accessing the Lahman Baseball Database via pandas.

[!IMPORTANT] The data used in this package is provided by Sean Lahman and is licensed under CC BY-SA 3.0. The data was last updated based on the source data available from http://www.seanlahman.com/ on 2024-08-21.

The surrounding software is licensed under the MIT License.

Installation

pylahman can be installed via pip:

pip install pylahman

Usage

>>> import pylahman as lbd
>>> lbd.pitching().columns
Index(['playerID', 'yearID', 'stint', 'teamID', 'lgID', 'W', 'L', 'G', 'GS',
       'CG', 'SHO', 'SV', 'IPouts', 'H', 'ER', 'HR', 'BB', 'SO', 'BAOpp',
       'ERA', 'IBB', 'WP', 'HBP', 'BK', 'BFP', 'GF', 'R', 'SH', 'SF', 'GIDP'],
      dtype='object')

Documentation

Like the package itself, data documentation is still a work in progress. The lahman-readme.txt file contains the documentation for the source data. The functions available in this package correspond to the table names listed in that documentation, but converted from CamelCase to the more popular snake_case in Python. For example the source table AllStarFull becomes allstar_full. The full list of available functions is:

  • allstar_full
  • appearances
  • awards_managers
  • awards_players
  • awards_share_managers
  • awards_share_players
  • batting
  • batting_post
  • college_playing
  • fielding
  • fielding_of
  • fielding_of_split
  • fielding_post
  • hall_of_fame
  • home_games
  • managers
  • managers_half
  • parks
  • people
  • pitching
  • pitching_post
  • salaries
  • schools
  • series_post
  • teams
  • teams_franchises
  • teams_half

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylahman-0.1.9.tar.gz (8.0 MB view details)

Uploaded Source

Built Distribution

pylahman-0.1.9-py3-none-any.whl (8.0 MB view details)

Uploaded Python 3

File details

Details for the file pylahman-0.1.9.tar.gz.

File metadata

  • Download URL: pylahman-0.1.9.tar.gz
  • Upload date:
  • Size: 8.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pylahman-0.1.9.tar.gz
Algorithm Hash digest
SHA256 20e197db67e06b7c1ddd52adaf46f2ebd693daff7eac15b41c3629b6f9abe229
MD5 2f1c46f5ec27ef60aa27029ff25b8ce3
BLAKE2b-256 a8531782fb55be9899a5de300d65d33d61316f6c0f24bd604d19ce8cdbba691e

See more details on using hashes here.

File details

Details for the file pylahman-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: pylahman-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 8.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for pylahman-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0ec0a4ff59b2861b8d6d41f5aa4c4b819ec0b88b6868a4ab7341fd211dc4a619
MD5 22038332e08fe38c8136e82ed3f22bac
BLAKE2b-256 1788267752019fc865b46cec920bc7d891e10b54fd185a2b381f7286bfb77db3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page