In #22343, we're bumping into a few problems around casting to / from extension arrays.
ExtensionArray.astype
doesn't handle target dtype
s that are extension types (so extension_array.astype('category')
fails). At the moment, each EA will have to implement their own astyping, which is error prone and difficult.I'm not sure how far down this road we want to go. Should we instead encorage users to use explicit constructors like .assign(x=pd.Categorical(...)
rather than .astype('category')
?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4