-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
AstypeDocsExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.
Description
pandas/pandas/core/arrays/base.py
Line 324 in 6d3565a
def astype(self, dtype, copy=True): |
Should the docstring say that this should return an ExtensionArray when an ExtensionType is passed into it?
I note that PeriodArray behaves like this.
import pandas as pd
a=pd.core.arrays.period_array([2000, 2001, 2002], freq='D')
type(a.dtype)
pandas.core.dtypes.dtypes.PeriodDtype
type(a.astype(a.dtype))
pandas.core.arrays.period.PeriodArray
Metadata
Metadata
Assignees
Labels
AstypeDocsExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.