Skip to main content

A tool to parse football game stats.

Project description

PylonParser

This package is used to obtain Pro Football Reference and Basketball Reference using web scraping tables, for example to perform data analysis or data science. All rights belong to the respective sites and the package should not be used to load their servers. Please read the corresponding specifications in their robots.txt files.

Installation

pip install pylonparser

Usage Provide instructions on how to use your project. Include code examples if possible.

url = "https://www.basketball-reference.com/boxscores/202405220MIN.html"

basketball_match = BasketballMatch(url)
df = pd.DataFrame(basketball_match.basic_away)
print(df.head())          id             player     mp    fg   fga  fg_pct  fg3  fg3a  fg3_pct   ft  fta  ft_pct  orb  drb  trb  ast  stl  blk  tov   pf   pts plus_minus reason
0  washipj01    P.J. Washington  40:50   4.0  10.0   0.400  2.0   8.0     0.25  3.0  3.0   1.000  0.0  7.0  7.0  0.0  0.0  2.0  3.0  4.0  13.0        +12    NaN
1  doncilu01        Luka Dončić  40:45  12.0  26.0   0.462  3.0  10.0     0.30  6.0  7.0   0.857  0.0  6.0  6.0  8.0  3.0  1.0  4.0  2.0  33.0         -9    NaN
2  irvinky01       Kyrie Irving  40:09  12.0  23.0   0.522  0.0   3.0     0.00  6.0  6.0   1.000  1.0  4.0  5.0  4.0  0.0  1.0  2.0  3.0  30.0         +5    NaN
3  jonesde02  Derrick Jones Jr.  34:55   4.0   9.0   0.444  0.0   2.0     0.00  0.0  0.0   0.000  2.0  2.0  4.0  2.0  0.0  0.0  0.0  1.0   8.0         -8    NaN
4  gaffoda01     Daniel Gafford  21:07   5.0   9.0   0.556  0.0   0.0     0.00  0.0  0.0   0.000  4.0  5.0  9.0  0.0  0.0  1.0  2.0  2.0  10.0        -15    NaN

Testing This project uses pytest for testing. To run the tests, use:

Contributing Contributions are welcome! Please read the contributing guidelines first.

License This project is licensed under the MIT License. See the LICENSE file for details.

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

pylonparser-0.4.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

pylonparser-0.4.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file pylonparser-0.4.1.tar.gz.

File metadata

  • Download URL: pylonparser-0.4.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1021-azure

File hashes

Hashes for pylonparser-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1327d45418fa7c263f23aee32d21e576e1f1a6b6f9464cfc4900665c34875b83
MD5 f8de0b581b7d1dc53725a4c90f461518
BLAKE2b-256 61b3b2b7495c861535eec6ac00f3b61981c136afc9ed34282c325c12fd4113ee

See more details on using hashes here.

File details

Details for the file pylonparser-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: pylonparser-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1021-azure

File hashes

Hashes for pylonparser-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99de2eb3875533816ce8c1be8801f8a632cf7cb3a93d6c4173b5bff65500ec5e
MD5 644a2e52af2fe8ec9f21c9bf8ed850eb
BLAKE2b-256 26e78058b2fd6a4502b3e846f44a679577d62c8534a80c9f975a68b4678df10e

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