Skip to content

Commit cddc939

Browse files
ENH: nullable Float32/64 ExtensionArray
1 parent e41ee47 commit cddc939

24 files changed

+1924
-8
lines changed

pandas/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
UInt16Dtype,
6060
UInt32Dtype,
6161
UInt64Dtype,
62+
Float32Dtype,
63+
Float64Dtype,
6264
CategoricalDtype,
6365
PeriodDtype,
6466
IntervalDtype,

pandas/arrays/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
BooleanArray,
88
Categorical,
99
DatetimeArray,
10+
FloatingArray,
1011
IntegerArray,
1112
IntervalArray,
1213
PandasArray,
@@ -20,6 +21,7 @@
2021
"BooleanArray",
2122
"Categorical",
2223
"DatetimeArray",
24+
"FloatingArray",
2325
"IntegerArray",
2426
"IntervalArray",
2527
"PandasArray",

pandas/core/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from pandas.core.algorithms import factorize, unique, value_counts
1515
from pandas.core.arrays import Categorical
1616
from pandas.core.arrays.boolean import BooleanDtype
17+
from pandas.core.arrays.floating import Float32Dtype, Float64Dtype
1718
from pandas.core.arrays.integer import (
1819
Int8Dtype,
1920
Int16Dtype,

pandas/core/arrays/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from pandas.core.arrays.boolean import BooleanArray
77
from pandas.core.arrays.categorical import Categorical
88
from pandas.core.arrays.datetimes import DatetimeArray
9+
from pandas.core.arrays.floating import FloatingArray
910
from pandas.core.arrays.integer import IntegerArray, integer_array
1011
from pandas.core.arrays.interval import IntervalArray
1112
from pandas.core.arrays.numpy_ import PandasArray, PandasDtype
@@ -21,6 +22,7 @@
2122
"BooleanArray",
2223
"Categorical",
2324
"DatetimeArray",
25+
"FloatingArray",
2426
"IntegerArray",
2527
"integer_array",
2628
"IntervalArray",

pandas/core/arrays/boolean.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,10 +604,11 @@ def logical_method(self, other):
604604
@classmethod
605605
def _create_comparison_method(cls, op):
606606
def cmp_method(self, other):
607-
from pandas.arrays import IntegerArray
607+
from pandas.arrays import IntegerArray, FloatingArray
608608

609609
if isinstance(
610-
other, (ABCDataFrame, ABCSeries, ABCIndexClass, IntegerArray)
610+
other,
611+
(ABCDataFrame, ABCSeries, ABCIndexClass, IntegerArray, FloatingArray),
611612
):
612613
# Rely on pandas to unbox and dispatch to us.
613614
return NotImplemented

0 commit comments

Comments
 (0)