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

REF: share code between pd.array and Series constructor #27460

Open
jbrockmendel opened this issue Jul 18, 2019 · 0 comments
Open

REF: share code between pd.array and Series constructor #27460

jbrockmendel opened this issue Jul 18, 2019 · 0 comments
Labels
Constructors Series/DataFrame/Index/pd.array Constructors Refactor Internal refactoring of code

Comments

@jbrockmendel
Copy link
Member

I've noticed a couple of places in the code where we do runtime imports of Series just to do values = Series(values)._values. It would be nice to avoid that.

This probably also means moving parts of internals.construction to somewhere like arrays.array_. In particular I think this would require moving sanitize_array and _try_cast. Since sanitize_array is imported by other modules, this would be nice to have non-internals anyway.

Finally there are some functions in dtype.cast that might make more sense alongside sanitize_array, e.g. construct_1d_object_array_from_listlike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors Refactor Internal refactoring of code
Projects
None yet
Development

No branches or pull requests

1 participant