Skip to content

Support duplicated columns (maybe?) #778

Open

Description

@phofl

We currently don't support duplicated columns, introducing support is not completely trivial since we would have to handle them properly in column projections. One example to explain the difficulties:

pdf = pd.DataFrame([[1, 2], [3, 4]], columns=list("aa"))
print(pdf["a"])

print(pdf[["a", "a"]])
0  1  2
1  3  4
   a  a  a  a
0  1  2  1  2
1  3  4  3  4

Selecting duplicated columns once returns all of them, but having them n times in the indexer duplicates the columns also n times, so we would have to be very careful to keep the count consistent. Other things also depend on set comparisons, which makes this even harder.

I don#t think that this is a very important feature for now, so I don't intend to prioritise this anytime soon

Activity

  1. added this to the TODO Features milestone on Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions