[GH-ISSUE #687] [FBref] Wrong year for player data #142

Closed
opened 2026-03-02 15:56:09 +03:00 by kerem · 4 comments
Owner

Originally created by @AZA-2003 on GitHub (Aug 21, 2024).
Original GitHub issue: https://github.com/probberechts/soccerdata/issues/687

Hello,

it seems like read_player_season_stats() returns the 24-25 player stats when 23-24 is passed as an argument; this seems to be happening with ITA-Serie A (I tried GER-Bundesliga and it worked fine)

Originally created by @AZA-2003 on GitHub (Aug 21, 2024). Original GitHub issue: https://github.com/probberechts/soccerdata/issues/687 Hello, it seems like read_player_season_stats() returns the 24-25 player stats when 23-24 is passed as an argument; this seems to be happening with ITA-Serie A (I tried GER-Bundesliga and it worked fine)
kerem 2026-03-02 15:56:09 +03:00
Author
Owner

@probberechts commented on GitHub (Aug 23, 2024):

FBref or Understat? Can you provide a minimal code example?

<!-- gh-comment-id:2307232254 --> @probberechts commented on GitHub (Aug 23, 2024): FBref or Understat? Can you provide a minimal code example?
Author
Owner

@AZA-2003 commented on GitHub (Aug 23, 2024):

FBref and here is a code section
image

Thank you!

<!-- gh-comment-id:2307404959 --> @AZA-2003 commented on GitHub (Aug 23, 2024): FBref and here is a code section <img width="572" alt="image" src="https://github.com/user-attachments/assets/912a825f-76fb-4564-9a5c-246577819afe"> Thank you!
Author
Owner

@probberechts commented on GitHub (Aug 23, 2024):

This seems to work fine:

>>> import soccerdata as sd

>>> fbref = sd.FBref("ITA-Serie A", "23-24", no_cache=True)
>>> df = fbref.read_player_season_stats(stat_type="standard")

>>> df.loc[("ITA-Serie A", "2324", "Atalanta", "Charles De Ketelaere"), "Performance"]

Gls      10
Ast       8
G+A      18
G-PK      9
PK        1
PKatt     1
CrdY      1
CrdR      0
Name: (ITA-Serie A, 2324, Atalanta, Charles De Ketelaere), dtype: Int64

De Ketelaere scored 10 goals last season, so this is correct!

<!-- gh-comment-id:2307471386 --> @probberechts commented on GitHub (Aug 23, 2024): This seems to work fine: ```python >>> import soccerdata as sd >>> fbref = sd.FBref("ITA-Serie A", "23-24", no_cache=True) >>> df = fbref.read_player_season_stats(stat_type="standard") >>> df.loc[("ITA-Serie A", "2324", "Atalanta", "Charles De Ketelaere"), "Performance"] Gls 10 Ast 8 G+A 18 G-PK 9 PK 1 PKatt 1 CrdY 1 CrdR 0 Name: (ITA-Serie A, 2324, Atalanta, Charles De Ketelaere), dtype: Int64 ``` De Ketelaere scored 10 goals last season, so this is correct!
Author
Owner

@AZA-2003 commented on GitHub (Aug 23, 2024):

Oh it works now! Thank you so much for your time! I really appreciate it!

<!-- gh-comment-id:2307492396 --> @AZA-2003 commented on GitHub (Aug 23, 2024): Oh it works now! Thank you so much for your time! I really appreciate it!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/soccerdata#142
No description provided.