Skip to content

fix: silence pandas regex FutureWarning in uniprot_feat#99

Merged
St3451 merged 1 commit into
masterfrom
fix/pandas-str-replace-deprecation
May 27, 2026
Merged

fix: silence pandas regex FutureWarning in uniprot_feat#99
St3451 merged 1 commit into
masterfrom
fix/pandas-str-replace-deprecation

Conversation

@St3451
Copy link
Copy Markdown
Collaborator

@St3451 St3451 commented May 27, 2026

pandas is deprecating implicit regex detection in Series.str.replace. The pattern r' \d+' is a regex (strips trailing numbers from DOMAIN descriptions, e.g. "Kinase 1" → "Kinase"). Adding regex=True keeps current behavior and silences the FutureWarning.

Copilot AI review requested due to automatic review settings May 27, 2026 08:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates scripts/plotting/uniprot_feat.py to explicitly pass regex=True to a pandas.Series.str.replace() call that intentionally uses a regex pattern, preventing the pandas FutureWarning about the upcoming change to the default regex behavior.

Changes:

  • Make the DOMAIN description cleanup explicitly regex-based by adding regex=True to str.replace(r' \d+', ...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@St3451 St3451 merged commit af195c0 into master May 27, 2026
1 check passed
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.

2 participants