Skip to content

[Bug]: Home Win-Loss Colab Example uses removed DataFrame.append (breaks on pandas ≥2.0) #683

Description

@astaffz

NBA API Version

V1.11.4

Issue

In the Home Win-Loss Data Prep Jupyter example, while structuring the DataFrames for schedules and game logs, it uses dataframe.append(), which has been removed in Pandas >= 2.0.

Since these examples are really useful for newer users of the API, I've already got a PR lined up, which switches to pd.concat()

Code

scheduleFrame = pd.DataFrame() 

for season in seasons:
    for id in teamLookup["id"]:
        time.sleep(1)
        scheduleFrame = scheduleFrame.append( 
            getRegularSeasonSchedule(season, id, seasonType)
        ) # Throws AttributeError

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageResearching into a possible bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions