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

Comments

Projects
None yet
3 participants
@jorisvandenbossche
Copy link
Member

commented Nov 10, 2017

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 ?

@TomAugspurger

This comment has been minimized.

Copy link
Contributor

commented Nov 10, 2017

+1 for deprecating.

@jreback

This comment has been minimized.

Copy link
Contributor

commented Nov 10, 2017

yep, didn't even know we had this.

@jorisvandenbossche

This comment has been minimized.

Copy link
Member Author

commented Nov 10, 2017

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

This comment has been minimized.

Copy link
Member Author

commented Nov 10, 2017

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
You can’t perform that action at this time.