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.ftype / DataFrame.ftypes #26705

Closed
jorisvandenbossche opened this issue Jun 7, 2019 · 6 comments

Comments

@jorisvandenbossche
Copy link
Member

commented Jun 7, 2019

With the ftype(s) property, you could check if data was sparse:

In [26]: df = pd.DataFrame({'a': pd.SparseArray([1, np.nan, 1])})

In [27]: df
Out[27]: 
     a
0  1.0
1  NaN
2  1.0

In [28]: df.dtypes
Out[28]: 
a    Sparse[float64, nan]
dtype: object

In [29]: df.ftypes
Out[29]: 
a    float64:sparse
dtype: object

But now that the dtype itself is a EA SparseDtype, I don't think those ftype and ftypes attributes serve any good purpose. So let's deprecate them.

@jreback

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

this is on my let’s deprecate ticket

@jorisvandenbossche

This comment has been minimized.

Copy link
Member Author

commented Jun 7, 2019

Yes, but wanted to highlight it specifically given all the sparse deprecations we are doing for 0.25.0, and small separate issues are easier taken up by contributors.

@jreback

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

totally fine pls link it though

@ThiviyanThanapalasingam

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2019

Hi @jreback @jorisvandenbossche,

I was looking for a good first issue to contribute to this project and came across this thread. Would you guys like any help with this issue?

@simonjayhawkins

This comment has been minimized.

Copy link
Member

commented Jun 8, 2019

@ThiviyanThanapalasingam go for it!

@ThiviyanThanapalasingam

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2019

Series.ftype, Series.ftypes and DataFrame.ftypes have been deprecated. I have also updated the docstrings for the sphinx documentation and updated the unit tests to test for deprecation warnings when these features are used. Check out pull request #26744. Please let me know know if I have overlooked anything. Any feedback would be appreciated :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.