Skip to content
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

Pandas support using new API #645

Closed
wisp3rwind opened this issue Jun 4, 2018 · 2 comments
Closed

Pandas support using new API #645

wisp3rwind opened this issue Jun 4, 2018 · 2 comments

Comments

@wisp3rwind
Copy link

The most recent pandas release (0.23) introduces extension types which I believe provide a natural way to integrate pint types into pandas dataframes on a per row/column basis. Is this a feature that could be merged here (assuming no breakage when older/no pandas is installed)?
If so, I'd be interested in researching that possibility further and maybe even implementing it myself. As a disclaimer, I've only started using pint quite recently and am not very proficient with pandas either and I'm not sure when I really get the time to do this. In any case, if someone else beats me to coding the feature, that'd be perfect, too :)

Related issues (which I haven't read fully):

@hgrecco
Copy link
Owner

hgrecco commented Jun 4, 2018

I would be very interested to support this. Maybe you can describe here how you envision this. But I would really like to see this happening.

This was referenced Aug 5, 2018
@znicholls znicholls mentioned this issue Aug 29, 2018
6 tasks
bors bot added a commit that referenced this issue Sep 6, 2018
684: Add pandas support r=hgrecco a=znicholls

This pull request adds pandas support to pint (hence is related to #645, #401 and pandas-dev/pandas#10349).

An example can be seen in `example-notebooks/basic-example.ipynb`.

It's a little bit hacksih, feedback would be greatly appreciated by me and @andrewgsavage. One obvious example is that we have to run all the interface tests with `pytest` to fit with `pandas` test suite, which introduces a dependency for the CI and currently gives us this awkward testing setup (see the alterations we had to make to `testsuite`). This also means that our code coverage tests are fiddly too.

If you'd like us to squash the commits, that can be done.

If pint has a linter, it would be good to run that over this pull request too as we're a little bit all over the place re style.

Things to discuss:

- [x]  general feedback and changes
- [x] test setup, especially need for pytest for pandas tests and hackish way to get around automatic discovery
- [x] squashing/rebasing
- [x] linting/other code style (related to #664 and #628: we're happy with whatever, I've found using an automatic linter e.g. black and/or flake8 has made things much simpler in other projects)
- [x] including notebooks in the repo (if we want to, I'm happy to put them under CI so we can make sure they run)
- [x] setting up the docs correctly

Co-authored-by: Zebedee Nicholls <zebedee.nicholls@climate-energy-college.org>
Co-authored-by: andrewgsavage <andrewgsavage@gmail.com>
@hgrecco hgrecco closed this as completed Dec 3, 2019
@bilderbuchi
Copy link
Contributor

@hgrecco is this closed as wontfix, works already, or refer to pint-pandas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants