Lahman Baseball Datasets
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.
Metadata
Release files for tq-lahman-datasets 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tq_lahman_datasets-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / tq_lahman_datasets-1.0-py3-none-any.whl
| Download URL | tq_lahman_datasets-1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e62fa280d0ca38275f708715c66d01e0d51a6d695c7623f75468108772df0921
|
|
BLAKE2b-256 checksum How to use checksums |
b82efcdcea003c44134724f286f49c8d5352e9c44749f3fc5b2ab30d74215f2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|