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 details)

Uploaded Python 3

File details

Details for the file tq_lahman_datasets-1.0-py3-none-any.whl.

File metadata

  • Download URL: tq_lahman_datasets-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for tq_lahman_datasets-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e62fa280d0ca38275f708715c66d01e0d51a6d695c7623f75468108772df0921
MD5 5623795ca6294395c6797073fa86ea48
BLAKE2b-256 b82efcdcea003c44134724f286f49c8d5352e9c44749f3fc5b2ab30d74215f2d

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