Skip to main content

No project description provided

Project description

Installation

With PIP:

pip install pycobb

From source:

git clone https://github.com/ryan-byrne/pycobb
cd pycobb
python install setup.py

Usage

Python

The pycobb Python Package and it's associated functions can be easily imported into an existing Python Project.

import pycobb

df = pycobb.get(pitchers=["Trevor Bauer"], batters=["Javier Baez"], years=[2018,2019])

This pycobb.get() returns a pandas DataFrame with stats on every pitch Trevor Bauer threw to Javier Baez in the 2018 and 2019 seasons.

Command Line Interface (CLI)

pycobb can return that same DataFrame from the command line. The option --print prints the DataFrame to the console:

pycobb get -p Trevor+Bauer -b Javier+Baez -y 2019 --print

Returns:

  pitch_type   game_date  release_speed  ...  spin_axis  delta_home_win_exp delta_run_exp
0         SL  2019-08-09           78.2  ...         80               0.058        -0.514
1         SL  2019-08-09           79.3  ...         81               0.000        -0.084
2         SL  2019-08-09           79.4  ...         87               0.046        -0.382
3         SL  2019-08-09           78.7  ...         81               0.020        -0.319
4         FC  2019-08-09           81.0  ...         68               0.000        -0.091
5         FF  2019-08-09           94.7  ...        202               0.000         0.121
6         FC  2019-08-09           81.7  ...         55               0.000         0.054
7         FC  2019-08-09           82.2  ...         70               0.000        -0.050
8         SL  2019-08-09           78.4  ...         79               0.000         0.037

[9 rows x 92 columns]

Additional Search Parameters

For a full list of search parameters, review the documentation

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

pycobb-0.0.4.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

pycobb-0.0.4-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file pycobb-0.0.4.tar.gz.

File metadata

  • Download URL: pycobb-0.0.4.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1

File hashes

Hashes for pycobb-0.0.4.tar.gz
Algorithm Hash digest
SHA256 57cceb42d684a37db5b751e4f9ed240e03031ab593bb5b234843c1bf1af71cfd
MD5 b6b19f7251f773dcfe4213e6c66e5e27
BLAKE2b-256 184d578499b86bec95fc319d2fc8ed6ea098d0db414e121bd0a6d7dd2099bf49

See more details on using hashes here.

File details

Details for the file pycobb-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pycobb-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.1

File hashes

Hashes for pycobb-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 be9aabaaf4eb23e4215e7c8a45494f163a4e3bd982a08822d9b423d853569d8d
MD5 2be8fd87531b35bd62ee01a2366abf1d
BLAKE2b-256 2d18cdee497592cb692b13d3274094fcc6bd04be1f567306e54210d773fe441b

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