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

DEPR: deprecate get_ftype_counts #18243

jreback opened this Issue Nov 12, 2017 · 3 comments


None yet
4 participants

jreback commented Nov 12, 2017

These are only to provide some inside into a sparse dtype. These should in theory be encoded in the dtypes (in pandas2), but in reality these are just cluttering the API and actually an implementation detail.


This comment has been minimized.


jorisvandenbossche commented Nov 13, 2017

As context, you can put a sparse data in a normal dataframe:

In [10]: df = pd.DataFrame({'a': [1, 2, 3]})

In [11]: df['b'] = pd.SparseSeries([3, 4, 5])

In [12]: df
   a  b
0  1  3
1  2  4
2  3  5

In [13]: df.dtypes
a    int64
b    int64
dtype: object

In [14]: df.ftypes
a     int64:dense
b    int64:sparse
dtype: object

In [16]: df['b']
0    3
1    4
2    5
Name: b, dtype: int64
Block locations: array([0], dtype=int32)
Block lengths: array([3], dtype=int32)

The question is: what is the alternative to easily check if a certain column is sparse ?

@jreback jreback referenced this issue Nov 13, 2017


DEPR: let's deprecate #18262

12 of 36 tasks complete

This comment has been minimized.

grutts commented Dec 21, 2017

Happy to add the deprecation warnings for the usage of these. Is there something in particular that they should be replaced with, or just removed in a future version? Also, presuming .ftype is to be left as is?


This comment has been minimized.


GGordonGordon commented Mar 19, 2018

The pull request only deals with deprecating .get_ftype_counts() and doesn't touch .ftypes since there was still some uncertainty around its deprecation.

xref #18262

@jreback jreback changed the title from DEPR: deprecate .ftypes, get_ftype_counts to DEPR: deprecate get_ftype_counts Mar 19, 2018

@jsexauer jsexauer referenced this issue Mar 19, 2018


DEPR: deprecations from prior versions #6581

0 of 82 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment