diff --git a/pint_pandas/pint_array.py b/pint_pandas/pint_array.py index 93c787e..aa40b2f 100644 --- a/pint_pandas/pint_array.py +++ b/pint_pandas/pint_array.py @@ -42,7 +42,7 @@ class PintType(ExtensionDtype): """ type = _Quantity - # kind = 'O' + kind = "O" # str = '|O08' # base = np.dtype('O') # num = 102 diff --git a/pint_pandas/testsuite/test_issues.py b/pint_pandas/testsuite/test_issues.py index 74f26eb..a4d2457 100644 --- a/pint_pandas/testsuite/test_issues.py +++ b/pint_pandas/testsuite/test_issues.py @@ -311,3 +311,14 @@ def test_issue246(self): # now an operation where each cell is independent from each other df.apply(lambda x: x * 2, axis=1) + + +def TestIssue245(BaseExtensionTests): + def test_issue245(self): + km = pd.Series([1.0, 2.0, np.nan], dtype="pint[km]") + kg = pd.Series([1.0, 2.0, np.nan], dtype="pint[kg]") + + xx = pd.DataFrame({"a": km, "b": km}) + yy = pd.DataFrame({"a": kg, "b": kg}) + + pd.concat([xx, yy], axis=0)