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

Deprecate Series.from_array ? #18213

Closed
jorisvandenbossche opened this issue Nov 10, 2017 · 4 comments
Closed

Deprecate Series.from_array ? #18213

jorisvandenbossche opened this issue Nov 10, 2017 · 4 comments
Labels
Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action
Milestone

Comments

@jorisvandenbossche
Copy link
Member

I just noticed we have a Series.from_array method (I was not conscientiously aware of that :-))

Is there any reason you would want to use that instead of the normal pd.Series(..) constructor ?

@jorisvandenbossche jorisvandenbossche added Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action labels Nov 10, 2017
@jorisvandenbossche jorisvandenbossche added this to the 0.22.0 milestone Nov 10, 2017
@TomAugspurger
Copy link
Contributor

+1 for deprecating.

@jreback
Copy link
Contributor

jreback commented Nov 10, 2017

yep, didn't even know we had this.

@jorisvandenbossche
Copy link
Member Author

Looking at the code: the thing it does differently compared to Series constructor is that it detects if a SparseArray is passed and in that case returns a SparseSeries.
Is that a use case we care about?

Further, it is also overridden in SparseSeries. Not sure if it there has a better use case than on plain Series.
(cc @sinhrks, or who are the Sparse experts nowadays?)

@jorisvandenbossche
Copy link
Member Author

Looking at the sparse code, it just passes through exactly to the SparseSeries class constructor, so there it has even less use it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

No branches or pull requests

3 participants