Why v1.1.0?
This new version introduces important additions to the match_data dataset.
Follow the steps below to upgrade to the latest version.
If the datafc package is already installed, you can update to the latest version by running the following command in the terminal:
pip install --upgrade datafcIf you haven’t installed datafc before, use the following command:
pip install datafcFor more details about the package, you can visit its PyPI or GitHub pages.
New Features
Team IDs
The following columns have been added:
home_team_id: Home team IDaway_team_id: Away team ID
Injury Time
The following columns have been added:
injury_time_1: First-half injury timeinjury_time_2: Second-half injury time
File Source Information
The saved file now includes a prefix indicating the data source.
Practical Example
Let’s check the team IDs and injury times for matchweek 24 of the 2024/25 Premier League season.
from datafc.sofascore import match_data
match_df = match_data(
tournament_id=17,
season_id=61627,
week_number=24,
enable_json_export=True
)The saved data file has been updated to include its source.
With the newly added columns, you can now directly access team IDs and injury times.
Best regards.