santosjorge / cufflinks

Productivity Tools for Plotly + Pandas
MIT License
3.02k stars 675 forks source link

[BUG] Handling two columns with the same name on .iplot() #282

Open thomktz opened 2 years ago

thomktz commented 2 years ago

[cufflinks 0.17.3, plotly >= 4.1.1, used in VisualStudioCode notebooks]

Reproduce

To reproduce the bug, call .iplot() on a dataframe containing two columns with the same name

Description

The graph will appear very weird and not readable at all

Proposed solution

When two or more columns have the same name, automatically rename them "{x}_0", "{x}_1", or "{x} (0)", "{x} (1)"

I can work on this myself if others find the issue problematic and the solution relevant.

image