Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Add support for Series and DF at methods #76

Merged
merged 17 commits into from Mar 13, 2020
Merged

Conversation

rpgoldman
Copy link
Contributor

Created _AtIndexer classes for Series and DataFrame and used them to type the corresponding at() methods.

Partial solution to #74.

This doesn't fully work, because it doesn't handle the possibility that a data frame will contain categorical (string) or integer data, instead of just float. I don't know how to do this.

Copy link
Member

@tmke8 tmke8 left a comment

Choose a reason for hiding this comment

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

_AtIndexerSeries should be made generic. The one for DataFrame can stay as it is for now.

pandas-stubs/core/frame.pyi Show resolved Hide resolved
pandas-stubs/core/indexing.pyi Outdated Show resolved Hide resolved
pandas-stubs/core/indexing.pyi Outdated Show resolved Hide resolved
pandas-stubs/core/indexing.pyi Outdated Show resolved Hide resolved
pandas-stubs/core/series.pyi Outdated Show resolved Hide resolved
@rpgoldman
Copy link
Contributor Author

I applied your changes and I think this is ready for (squash) merge.

@rpgoldman rpgoldman force-pushed the at-methods branch 2 times, most recently from f7d1e95 to 5f7bbb8 Compare March 2, 2020 21:11
@rpgoldman rpgoldman changed the title WIP: Add support for Series and DF at methods Add support for Series and DF at methods Mar 2, 2020
@rpgoldman
Copy link
Contributor Author

@thomkeh I think that this is ready for another review, and possibly merging.

pandas-stubs/core/frame.pyi Outdated Show resolved Hide resolved
pandas-stubs/core/frame.pyi Outdated Show resolved Hide resolved
numpy-stubs/__init__.pyi Outdated Show resolved Hide resolved
numpy-stubs/__init__.pyi Show resolved Hide resolved
numpy-stubs/__init__.pyi Outdated Show resolved Hide resolved
pandas-stubs/__init__.pyi Outdated Show resolved Hide resolved
rpgoldman and others added 17 commits March 3, 2020 12:22
Created _AtIndexer classes for Series and DataFrame and used them to type the corresponding at() methods.
Co-Authored-By: thomkeh <7741417+thomkeh@users.noreply.github.com>
Co-Authored-By: thomkeh <7741417+thomkeh@users.noreply.github.com>
These integers are valid alternatives to 'index' and 'columns'.
I was using `dtype` as a type where I should have been using `Type[dtype]`.
Co-Authored-By: thomkeh <7741417+thomkeh@users.noreply.github.com>
Co-Authored-By: thomkeh <7741417+thomkeh@users.noreply.github.com>
Co-Authored-By: thomkeh <7741417+thomkeh@users.noreply.github.com>
Co-Authored-By: thomkeh <7741417+thomkeh@users.noreply.github.com>
@rpgoldman
Copy link
Contributor Author

Resolved conflicts and force-pushed.

@rpgoldman
Copy link
Contributor Author

rpgoldman commented Mar 4, 2020

@thomkeh (squash) merge?

@tmke8
Copy link
Member

tmke8 commented Mar 13, 2020

Sorry, I was very busy with work! Looks all good!

@tmke8 tmke8 merged commit 34204a9 into wearepal:master Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants