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

Closed
jreback opened this Issue Nov 12, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@jreback
Contributor

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.

@jorisvandenbossche

This comment has been minimized.

Member

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
Out[12]: 
   a  b
0  1  3
1  2  4
2  3  5

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

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

In [16]: df['b']
Out[16]: 
0    3
1    4
2    5
Name: b, dtype: int64
BlockIndex
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

Open

DEPR: let's deprecate #18262

12 of 36 tasks complete
@grutts

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?

@GGordonGordon

This comment has been minimized.

Contributor

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

Open

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