Skip to main content

Standardized NK (NPB & KBO) baseball datasets with pandas loaders. Includes MLB players who appeared in NPB/KBO.

Project description

NK_datasets

NK_datasets ships standardized datasets for NPB (Nippon Professional Baseball) and KBO (Korea Baseball Organization), packaged with pandas loaders.
It also includes MLB players who have played in either NPB, KBO, or both.

Requirements

  • Python 3.9+
  • pandas 1.5+

Install

pip install nk_datasets

Import

import nk

All Datasets are grouped into the following collections:

  • kbo_npb – KBO/NPB league tables: load_kbo_batting(), load_kbo_pitching(), load_kbo_fielding(), load_kbo_people()``load_npb_batting(), load_npb_pitching(), load_npb_fielding(), load_npb_people()

  • kbo_npb_mlb – KBO/NPB/MLB league tables with aligned columns for direct comparison across all 3 leagues: load_kbo_batting_aligned(), load_kbo_pitching_aligned(), load_kbo_fielding_aligned(), load_kbo_people_aligned(), load_npb_batting_aligned(), load_npb_pitching_aligned(), load_npb_fielding_aligned(), load_npb_people_aligned(), load_mlb_batting_aligned(), load_mlb_pitching_aligned(), load_mlb_fielding_aligned(), load_mlb_people_aligned()

  • nk_merged – "wide" merged tables (combined schema across KBO and NPB): load_nk_batting(), load_nk_pitching(), load_nk_fielding(), load_nk_people(), load_nk_league(), load_nk_team(), load_nk_merged_people()

  • nk_merged_tall – "tall" player stats, split by league/data slice: load_nk_playerstats_KBO(), load_nk_playerstats_PL(), load_nk_playerstats_CL(), load_nk_playerstats_JBL(), load_nk_league(), load_nk_team(), load_nk_stats()

Short Snippet

import nk_datasets as nk

# load nk_merged batting table
df = nk.load_nk_batting()

# show first rows
print(df.head())

License

MIT License © Myungkeun Park

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

nk_datasets-0.1.0.tar.gz (34.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nk_datasets-0.1.0-py3-none-any.whl (36.2 MB view details)

Uploaded Python 3

File details

Details for the file nk_datasets-0.1.0.tar.gz.

File metadata

  • Download URL: nk_datasets-0.1.0.tar.gz
  • Upload date:
  • Size: 34.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for nk_datasets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6df55d8022253350d1b543aa151b7c6db2755b62236ac57fb4515332f3cb839c
MD5 e5bc6116ccc7896ee0137202e04de6bf
BLAKE2b-256 d0b636943ee859f23ae86e4202caf63aa09d8730170d8624f1d4d53a8460523e

See more details on using hashes here.

File details

Details for the file nk_datasets-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nk_datasets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for nk_datasets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b04b3e51c895c229e18bc92e712c467068777d5c2a76d4ede93e3c80a327c93d
MD5 879d5f15b2bf6bf91ae41fcfc29b0200
BLAKE2b-256 8c4f734aaf76e08a85c48e7942bf43d3e9051648b117f57b6a29e09c7f77fb49

See more details on using hashes here.

Supported by

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