Skip to main content

This package contains the Lahman baseball database.

Project description

Lahman Baseball Datasets

CI

This package consists of the Lahman Baseball Database with the intent of consuming it from Python code via the Pandas library. The package was inspired from the book Analyzing Baseball Data with R. Obviously R is not Python so this package allows one to do the analyses covered in the book (as well as you own) using Python.

Installation

Install using pip:

pip install tq-lahman-datasets

Usage

Download and load the Pandas DataFrames into memory:

from teqniqly.lahman_datasets import LahmanDatasets

ld = LahmanDatasets()
ld.load()

Get the dataframe names. Each dataframe corresponds to a CSV file in the Lahman database:

df_names = ld.dataframe_names

Load datasets by providing the dataset name as an indexer to the LahmanDatasets instance:

batting_df = ld["Batting"]

The datasets are Pandas DataFrames so work with them as you would with other DataFrames.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

tq_lahman_datasets-1.0-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

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