-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
CLN: Move _convert_to_list_like to common #34127
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
Conversation
pandas/core/common.py
Outdated
|
||
|
||
def convert_to_list_like(values): | ||
if hasattr(values, "dtype"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u type and add a doc string
make these elif
see where else we can u this
|
||
def convert_to_list_like( | ||
values: Union[Scalar, Iterable, AnyArrayLike] | ||
) -> Union[List, AnyArrayLike]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to rewrite this a bit to get it to type check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsaxton i noticed you used ABCIndex instead of ABCIndexClass, was that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, definitely change if you feel it's not correct
@@ -4,17 +4,16 @@ | |||
Note: pandas.core.common is *not* part of the public API. | |||
""" | |||
|
|||
import collections | |||
from collections import abc | |||
from collections import abc, defaultdict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly unrelated, but this seems better than mixing the two import styles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
hmm azure doesnt' seem to be running. can you merge master and ping on green. |
thanks |
No description provided.