Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions pandas/core/arrays/boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
lib,
missing as libmissing,
)
from pandas.util._decorators import set_module

from pandas.core.dtypes.common import is_list_like
from pandas.core.dtypes.dtypes import register_extension_dtype
Expand All @@ -39,6 +40,7 @@


@register_extension_dtype
@set_module("pandas")
class BooleanDtype(BaseMaskedDtype):
"""
Extension dtype for boolean data.
Expand Down
4 changes: 4 additions & 0 deletions pandas/core/arrays/floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import numpy as np

from pandas.util._decorators import set_module

from pandas.core.dtypes.base import register_extension_dtype
from pandas.core.dtypes.common import is_float_dtype

Expand Down Expand Up @@ -168,13 +170,15 @@ class FloatingArray(NumericArray):


@register_extension_dtype
@set_module("pandas")
class Float32Dtype(FloatingDtype):
type = np.float32
name: ClassVar[str] = "Float32"
__doc__ = _dtype_docstring.format(dtype="float32")


@register_extension_dtype
@set_module("pandas")
class Float64Dtype(FloatingDtype):
type = np.float64
name: ClassVar[str] = "Float64"
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/arrays/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import numpy as np

from pandas.util._decorators import set_module

from pandas.core.dtypes.base import register_extension_dtype
from pandas.core.dtypes.common import is_integer_dtype

Expand Down Expand Up @@ -218,55 +220,63 @@ class IntegerArray(NumericArray):


@register_extension_dtype
@set_module("pandas")
class Int8Dtype(IntegerDtype):
type = np.int8
name: ClassVar[str] = "Int8"
__doc__ = _dtype_docstring.format(dtype="int8")


@register_extension_dtype
@set_module("pandas")
class Int16Dtype(IntegerDtype):
type = np.int16
name: ClassVar[str] = "Int16"
__doc__ = _dtype_docstring.format(dtype="int16")


@register_extension_dtype
@set_module("pandas")
class Int32Dtype(IntegerDtype):
type = np.int32
name: ClassVar[str] = "Int32"
__doc__ = _dtype_docstring.format(dtype="int32")


@register_extension_dtype
@set_module("pandas")
class Int64Dtype(IntegerDtype):
type = np.int64
name: ClassVar[str] = "Int64"
__doc__ = _dtype_docstring.format(dtype="int64")


@register_extension_dtype
@set_module("pandas")
class UInt8Dtype(IntegerDtype):
type = np.uint8
name: ClassVar[str] = "UInt8"
__doc__ = _dtype_docstring.format(dtype="uint8")


@register_extension_dtype
@set_module("pandas")
class UInt16Dtype(IntegerDtype):
type = np.uint16
name: ClassVar[str] = "UInt16"
__doc__ = _dtype_docstring.format(dtype="uint16")


@register_extension_dtype
@set_module("pandas")
class UInt32Dtype(IntegerDtype):
type = np.uint32
name: ClassVar[str] = "UInt32"
__doc__ = _dtype_docstring.format(dtype="uint32")


@register_extension_dtype
@set_module("pandas")
class UInt64Dtype(IntegerDtype):
type = np.uint64
name: ClassVar[str] = "UInt64"
Expand Down
12 changes: 12 additions & 0 deletions pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,23 @@ def test_util_in_top_level(self):
def test_set_module():
assert pd.DataFrame.__module__ == "pandas"
assert pd.CategoricalDtype.__module__ == "pandas"
assert pd.DatetimeTZDtype.__module__ == "pandas"
assert pd.PeriodDtype.__module__ == "pandas"
assert pd.IntervalDtype.__module__ == "pandas"
assert pd.SparseDtype.__module__ == "pandas"
assert pd.ArrowDtype.__module__ == "pandas"
assert pd.StringDtype.__module__ == "pandas"
assert pd.BooleanDtype.__module__ == "pandas"
assert pd.Int8Dtype.__module__ == "pandas"
assert pd.Int16Dtype.__module__ == "pandas"
assert pd.Int32Dtype.__module__ == "pandas"
assert pd.Int64Dtype.__module__ == "pandas"
assert pd.UInt8Dtype.__module__ == "pandas"
assert pd.UInt16Dtype.__module__ == "pandas"
assert pd.UInt32Dtype.__module__ == "pandas"
assert pd.UInt64Dtype.__module__ == "pandas"
assert pd.Float32Dtype.__module__ == "pandas"
assert pd.Float64Dtype.__module__ == "pandas"
assert pd.Index.__module__ == "pandas"
assert pd.CategoricalIndex.__module__ == "pandas"
assert pd.DatetimeIndex.__module__ == "pandas"
Expand Down
Loading