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 pandas Index opt-in #88

Closed
MarcoGorelli opened this issue Sep 29, 2022 · 8 comments
Closed

Make pandas Index opt-in #88

MarcoGorelli opened this issue Sep 29, 2022 · 8 comments

Comments

@MarcoGorelli
Copy link
Contributor

MarcoGorelli commented Sep 29, 2022

The issue here is

The DataFrame spec does not include an Index. Many Pandas APIs (e.g., groupby, concat) operate on the index by default.

Make Index an “opt-in” feature of these APIs.

Summary of the consortium meeting minutes:

  • proposal is to have a default index which goes from 0 to len
  • it handles things different when you do something like concat or filter out rows
  • it will help other libraries.
@MarcoGorelli
Copy link
Contributor Author

@jorisvandenbossche
Copy link
Member

Could you enabled commenting on the hackmd? (it's somewhere in the sharing settings I think)

@kkraus14
Copy link
Collaborator

kkraus14 commented Sep 29, 2022

-1

I've shared my opinion on this multiple times, but making this opt-in will effectively make it required for every project. A very large percentage of code will target this standard and test their usage of it via Pandas and will end up using the optional components that Pandas supports and avoid the components it doesn't support without a second thought. This will make all other libraries supporting this standard feel compelled to support indexes and other Pandas-supported optional components, which leaves us in a similar state to the existing DataFrame ecosystem.

The writeup seems to focus on compatibility with existing Pandas APIs and behaviors. Is that and should that really be a goal of this standard API work?

@rgommers
Copy link
Member

@kkraus14 a bit of context is still missing in the issue description, this was about Pandas and not about a dataframe standard. No optional index in sight for the latter.

@jbrockmendel
Copy link
Contributor

Then does this belong on the pandas tracker?

@MarcoGorelli MarcoGorelli changed the title Make Index opt-in Make pandas Index opt-in Sep 29, 2022
@MarcoGorelli
Copy link
Contributor Author

@jorisvandenbossche sure, done (I think), are you able to comment now?

Apologies @kkraus14 , I shared this here because although it's about pandas, it's in the context of the dataframe standard. Perhaps the pandas issue tracker indeed have been a better place, I'll move it there

@MarcoGorelli
Copy link
Contributor Author

I can't transfer this issue, so I've made a new one in the pandas tracker: pandas-dev/pandas#48880

@rgommers
Copy link
Member

rgommers commented Oct 4, 2022

Thanks @MarcoGorelli, all. Let's close this issue then.

@rgommers rgommers closed this as completed Oct 4, 2022
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

5 participants