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

ENH: Expose NoDefault in pandas.api.extensions #60696

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/whatsnew/v3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Other enhancements
^^^^^^^^^^^^^^^^^^
- :class:`pandas.api.typing.FrozenList` is available for typing the outputs of :attr:`MultiIndex.names`, :attr:`MultiIndex.codes` and :attr:`MultiIndex.levels` (:issue:`58237`)
- :class:`pandas.api.typing.SASReader` is available for typing the output of :func:`read_sas` (:issue:`55689`)
- :class:`pandas.api.extensions.NoDefault` is available for typing ``no_default``
snitish marked this conversation as resolved.
Show resolved Hide resolved
- :func:`DataFrame.to_excel` now raises an ``UserWarning`` when the character count in a cell exceeds Excel's limitation of 32767 characters (:issue:`56954`)
- :func:`pandas.merge` now validates the ``how`` parameter input (merge type) (:issue:`59435`)
- :func:`read_spss` now supports kwargs to be passed to pyreadstat (:issue:`56356`)
Expand Down
6 changes: 5 additions & 1 deletion pandas/api/extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
Public API for extending pandas objects.
"""

from pandas._libs.lib import no_default
from pandas._libs.lib import (
NoDefault,
no_default,
)

from pandas.core.dtypes.base import (
ExtensionDtype,
Expand All @@ -24,6 +27,7 @@
"ExtensionArray",
"ExtensionDtype",
"ExtensionScalarOpsMixin",
"NoDefault",
"no_default",
"register_dataframe_accessor",
"register_extension_dtype",
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ class TestApi(Base):
]
allowed_api_extensions = [
"no_default",
"NoDefault",
"ExtensionDtype",
"register_extension_dtype",
"register_dataframe_accessor",
Expand Down