Skip to content

QDataFrame #45602

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
wants to merge 1 commit into from
Closed

QDataFrame #45602

wants to merge 1 commit into from

Conversation

wkerzendorf
Copy link

Not sure where that fits inside pandas. Happy to add tests to this but this works AFAICT.

@pep8speaks
Copy link

Hello @wkerzendorf! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 5:1: E302 expected 2 blank lines, found 1
Line 25:1: E302 expected 2 blank lines, found 1
Line 35:23: E231 missing whitespace after ':'
Line 35:41: W291 trailing whitespace
Line 36:43: W291 trailing whitespace
Line 57:12: W291 trailing whitespace
Line 58:89: E501 line too long (101 > 88 characters)
Line 81:89: E501 line too long (110 > 88 characters)
Line 82:26: W292 no newline at end of file

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this cannot be pandas code proper. we don't depend on astropy (and won't).

however would not object to this in a test.

@jbrockmendel
Copy link
Member

I really advise you guys to implement an ExtensionArray rather than a DataFrame/Series subclass. See #45544

@mroeschke
Copy link
Member

I'd be leery to even include this as a test in pandas. I think we don't really have a prescient of testing 3rd party package EA in our CI and I think better left tested by astropy.

@wkerzendorf
Copy link
Author

I guess a

try:
    import astropy
except ImportError:
     raise ImportError('QDataFrame requires astropy') 

is not an acceptable solution to you? (I know you do this with pytables and HDF5).

In any case, the community really wants such a feature - am happy to implement this and host this elsewhere. I would need some help with ExtensionArray if possible.

@mroeschke
Copy link
Member

That import pattern is typically used for internal IO support.

I would recommend this new ExtenstionArray living in astropy or an astropy project repo like other projects have done: https://pandas.pydata.org/docs/ecosystem.html?highlight=ecosystem#extension-data-types

You can reference https://pandas.pydata.org/docs/development/extending.html for a guide for developing the ExtensionArray

@jreback
Copy link
Contributor

jreback commented Jan 28, 2022

closing. we would take an EA implementation as a test (but likey better off done as an external package).

@jreback jreback added ExtensionArray Extending pandas with custom dtypes or arrays. Subclassing Subclassing pandas objects labels Jan 28, 2022
@jreback jreback added this to the No action milestone Jan 28, 2022
@jreback jreback closed this Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Subclassing Subclassing pandas objects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: unit of measurement / physical quantities
5 participants