Skip to content

Custom Dtypes and T #22792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
achapkowski opened this issue Sep 20, 2018 · 4 comments
Closed

Custom Dtypes and T #22792

achapkowski opened this issue Sep 20, 2018 · 4 comments

Comments

@achapkowski
Copy link

I created a custom Array called GeoArray(NumPyBackedExtensionArrayMixin).

When I try to dump out my custom array, I get the following error:

builtins.AttributeError: 'GeoArray' object has no attribute 'T'

What does T have to be? How do I define it?

@TomAugspurger
Copy link
Contributor

When I try to dump out my custom array,

What do you mean dump out?

.T is an alias of .transpose().

@achapkowski
Copy link
Author

I mean save the dataframe to an HDF5 table.

@achapkowski
Copy link
Author

Where should I define transpose on the on my NumPyBackedExtensionArrayMixin(ExtensionArray): or on my GeoArray class?

@TomAugspurger
Copy link
Contributor

Serializing extensions arrays is basically unsupported right now (though pickle usually works). See #20612, and if you're interested in working on it let us know. It can be done for specific readers / writers in separate PRs.

.T / transpose isn't part of the EA interface and I don't think we'll include it, since it doesn't make sense for EAs.

@TomAugspurger TomAugspurger added this to the No action milestone Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants