Skip to content

add Column.__dataframe_namespace__ #175

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

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented May 24, 2023

Pretty minor, hope this is uncontroversial

use-case: you have a function which accepts a Column as input, and you need to access some method from the top-level namespace

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the use case, but https://data-apis.org/dataframe-api/draft/purpose_and_scope.html#checking-a-dataframe-object-for-compliance strongly implies that this method should only be implemented by standard-compliant dataframe objects, and that it's the way to check whether an object is such a dataframe.

I think it should probably be __column_namespace__ instead, as the one way to check if this is a standard-compliant Column object. And it additionally can guarantee that it will return the same namespace as for DataFrame.__dataframe_namespace__.

@MarcoGorelli MarcoGorelli requested a review from rgommers June 20, 2023 13:13
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, in it goes. Thanks Marco!

@rgommers rgommers changed the title add Column.__dataframe_namespace__ add Column.__dataframe_namespace__ Jun 20, 2023
@rgommers rgommers merged commit 5df2ede into data-apis:main Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants