Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support duplicated columns (maybe?) #778

Open
phofl opened this issue Jan 19, 2024 · 0 comments
Open

Support duplicated columns (maybe?) #778

phofl opened this issue Jan 19, 2024 · 0 comments
Milestone

Comments

@phofl
Copy link
Collaborator

phofl commented Jan 19, 2024

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

@phofl phofl added this to the TODO Features milestone Jan 19, 2024
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

No branches or pull requests

1 participant