mirror of
https://github.com/probberechts/soccerdata.git
synced 2026-04-25 18:15:58 +03:00
[PR #309] [MERGED] Handle canceled / forfeited games #451
Labels
No labels
ESPN
FBref
FotMob
MatchHistory
SoFIFA
Sofascore
WhoScored
WhoScored
bug
build
common
dependencies
discussion
documentation
duplicate
enhancement
good first issue
invalid
performance
pull-request
question
question
removal
understat
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/soccerdata#451
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/probberechts/soccerdata/pull/309
Author: @lorenzodb1
Created: 7/27/2023
Status: ✅ Merged
Merged: 7/27/2023
Merged by: @probberechts
Base:
master← Head:lorenzodb1_fix_tottenham_concat_bug📝 Commits (8)
cf1e503Removed unused importd866de3Rebased to current master6992ee9Added test for the case where _concat is used with forfeited matches38223e6Changed logic in _concat to better deal with dfs with columns not matching4837bd1Test for forfeited games should make sure order doesn't matterc010523Changes from pre-commit that were not applied beforefde36e6Changed _concat to return the same columns when there's a forfeited match regardless of the order of matches7aa1446Re-added missing if statement📊 Changes
2 files changed (+26 additions, -24 deletions)
View changed files
📝
soccerdata/fbref.py(+18 -11)📝
tests/test_FBref.py(+8 -13)📄 Description
_concat would throw an error when analysing Tottenham-Rennes, as the game was forfeited and, therefore, there is no match data available for it. The dataframe resulting from this page had fewer columns than the ones for other games in the competition, thus throwing an error.
This is a new attempt to solve #304.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.