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

Make Cols more flexible #2875

Closed
bkamins opened this issue Sep 12, 2021 · 1 comment · Fixed by #2881
Closed

Make Cols more flexible #2875

bkamins opened this issue Sep 12, 2021 · 1 comment · Fixed by #2881
Labels
Milestone

Comments

@bkamins
Copy link
Member

bkamins commented Sep 12, 2021

Possible useful additions:

  • Cols(<:Type)
  • Cols(<:Function)

that would match how the names function works.

@nalimilan - the only limitation is that currently AbstractIndex is not aware of data frame columns, and we handle Cols on AbstractIndex level. I will have to think how to handle this cleanly (as the simplest solution is to add special methods on AbstractDataFrame level, but it is not nice as then some of the methods for handling columns would be defined at index level, and some at data frame level).

@bkamins bkamins added this to the 1.3 milestone Sep 12, 2021
@bkamins
Copy link
Member Author

bkamins commented Sep 13, 2021

Adding Cols(<:Type) this would require a significant redesign of the package. We would have to pass around AbstractDataFrame or DataFrameRow in places were we currently pass around AbstactIndex (and there are many such places). Also with DataFrameRow is would be especially tricky to add.

I would constrain ourselves for now to Cols(<:Function) which should be easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant