Skip to content

Unable to get the Team ID and Player ID using FBref() function #72

Description

@PGupta-Git

As the title says, I am unable to retrieve the Team ID and Player ID columns after scraping data with FBRef, which is making deduplication difficult as I am unable to merge the dataframe with a UUID, resulting in many duplicate values. Hence, want to know if this is a bug or justan implementation issue from my end

scrape_stats(year: str, league: str, stat_category: str) → dict[str, DataFrame]

Scrapes a single stats category

Adds team and player ID columns to the stats tables

Parameters:

        year (str) – See the [FBref](https://scraperfc.readthedocs.io/en/latest/year_parameter.html#fbref-year) year parameter docs for details.

        league (str) – See the src/ScraperFC/comps.yaml file for all available competitions.

        stat_category (str) – The stat category to scrape.

Returns:

    (squad_stats, opponent_stats, player_stats). Tuple elements will be None if the squad stats category does not contain data for the given year and league.
Return type:

    tuple[pd.DataFrame | None]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions