Convert NBA injury reports from PDF to a DataFrame
Project description
NBA Injury Report PDF to DataFrame Converter
This Python package provides a function, pdf_to_df, that converts NBA injury reports in PDF format into a pandas DataFrame for easy analysis and manipulation.
Features
- PDF to DataFrame Conversion: Extracts data from NBA injury report PDFs and structures it into a pandas DataFrame.
- Data Cleaning: Handles multi-row entries and corrects common formatting issues in the reports.
Installation
Install the package using pip:
pip install nba-injury-report-pdf-to-df
Usage
Here's how you can use the pdf_to_df function:
from nba_injury_report_pdf_to_df import pdf_to_df
# Path to your local NBA injury report PDF
pdf_path = "path/to/your/injury_report.pdf"
# Convert PDF to DataFrame
df = pdf_to_df(pdf_path)
# Display the DataFrame
print(df.head())
Important Note
This package is designed to process NBA injury reports that follow the format used in January 2025.
The structure of these reports includes specific columns such as:
- Game Date
- Game Time
- Matchup
- Team
- Player Name
- Current Status
- Reason
If the NBA updates the report format in the future, this package may require modifications to ensure compatibility.
Dependencies
- pandas
- pdfplumber
These dependencies are automatically installed with the package.
Contributing
Contributions are welcome!
If you encounter issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository:
https://github.com/johngoodhand/nba-injury-report-pdf-to-df
License
This project is licensed under the MIT License.
Note: This package is not affiliated with or endorsed by the National Basketball Association (NBA).
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nba_injury_report_pdf_to_df-0.1.7.tar.gz.
File metadata
- Download URL: nba_injury_report_pdf_to_df-0.1.7.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c7f8c1d1b27feaf72d953e9b2a1a993c0eb3847c737c414f31b39c445ce50f2
|
|
| MD5 |
ffbeb447c290eac4a8a0f55be9959144
|
|
| BLAKE2b-256 |
24741c58b497e2a964d45c53d34eaed56aac43c61ee4a6fac14f7a6a0a47bb88
|
File details
Details for the file nba_injury_report_pdf_to_df-0.1.7-py3-none-any.whl.
File metadata
- Download URL: nba_injury_report_pdf_to_df-0.1.7-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b4858393c6518cb800d66e81a10f9d039a879814018d194837e6da068e863b2
|
|
| MD5 |
e3ce2f804899786b02a04f324148f5e3
|
|
| BLAKE2b-256 |
a33ce6388e364e9a7f2cab1a79f03bcc9282c1300c280ebd5a322f03596e71fb
|