Skip to content

Fix FutureWarning in team_results.py#500

Open
yasumorishima wants to merge 1 commit intojldbc:masterfrom
yasumorishima:fix/issue-459-team-results-future-warning
Open

Fix FutureWarning in team_results.py#500
yasumorishima wants to merge 1 commit intojldbc:masterfrom
yasumorishima:fix/issue-459-team-results-future-warning

Conversation

@yasumorishima
Copy link
Copy Markdown

Summary

  • Fix FutureWarning caused by chained assignment with inplace=True in team_results.py (line 75)
  • Replace df['Attendance'].replace(..., inplace=True) with df['Attendance'] = df['Attendance'].replace(...) as recommended by pandas

Closes #459

Details

pandas 3.0 deprecates chained assignment using inplace methods. The fix follows the recommended pattern from the warning message.

Before:

df['Attendance'].replace(r'^Unknown$', np.nan, regex=True, inplace = True)

After:

df['Attendance'] = df['Attendance'].replace(r'^Unknown$', np.nan, regex=True)

Replace deprecated chained assignment with direct assignment
to avoid FutureWarning in pandas 3.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Team Results Future Warning

1 participant