Skip to content

API: Is pandas.util public? #55023

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

Open
twoertwein opened this issue Sep 6, 2023 · 2 comments
Open

API: Is pandas.util public? #55023

twoertwein opened this issue Sep 6, 2023 · 2 comments
Labels
API Design Needs Discussion Requires discussion from core team before further action

Comments

@twoertwein
Copy link
Member

util is not re-exported in pandas/__init__.py (pd.util fails) but two functions are documented to be public in pd.util: hash_pandas_object and hash_array.

Should these two functions directly be accessed through pandas/__init__.py or should util be re-exported? If util should be re-exported, what about the other functions/classes in pandas/util/__init__.py (they are not documented to be public)?

@rhshadrach
Copy link
Member

This was added to the docs in #23082. Also #23066 (comment) seems particularly relevant.

The API docs explicitly state that pandas.util is private.

I see four options here:

  • Move to the top namespace
  • Move to pandas.api.??
  • Make pandas.util public
  • Deprecate these methods from being public (if they aren't being used by 3rd parties)

No real opinion.

@rhshadrach rhshadrach added API Design Needs Discussion Requires discussion from core team before further action labels Sep 6, 2023
@mroeschke
Copy link
Member

I would opt to move them to the top namespace or pandas.api.util and deprecate them from pandas.util

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

No branches or pull requests

3 participants