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:
--upgrade datafc pip install
If you haven’t installed datafc
before, use the following command:
pip install datafc
For 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_data(
match_df =17,
tournament_id=61627,
season_id=24,
week_number=True
enable_json_export )
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.