Skip to content

Rename duplicate column names with a warning instead of erroring - #1091

Open
aeturrell wants to merge 1 commit into
mainfrom
fix-duplicate-column-names
Open

aeturrell wants to merge 1 commit into
mainfrom
fix-duplicate-column-names

Conversation

@aeturrell

Copy link
Copy Markdown
Owner

skim, skim_get_data and skim_get_figure crashed on pandas dataframes with
duplicate column names (AttributeError for same-type duplicates, ValueError
for mixed types). Duplicates are now renamed a_1, a_2, ... on skimpy's
internal copy, skipping names already in use, and a UserWarning lists the
renames. The user's dataframe is unchanged.

Fixes #918

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01PJYhveC9URTcDiP2P8S4Ah

skim, skim_get_data and skim_get_figure crashed on pandas dataframes with
duplicate column names (AttributeError for same-type duplicates, ValueError
for mixed types). Duplicates are now renamed a_1, a_2, ... on skimpy's
internal copy, skipping names already in use, and a UserWarning lists the
renames. The user's dataframe is unchanged.

Fixes #918

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJYhveC9URTcDiP2P8S4Ah

This branch has not been deployed

No deployments
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.

Error if there are duplicate column names

2 participants