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

Add property inferred_type for Index & MultiIndex #1745

Merged
merged 4 commits into from
Sep 3, 2020

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Sep 2, 2020

Since Index.mixed is deprecated in pandas, and they recommend use inferred_type.

  • Anyway in Koalas, is_mixed() is not that useful because we don't support the mixed type though.
>>> pd.Index([1, 2, 3]).is_mixed()
<stdin>:1: FutureWarning: Index.is_mixed is deprecated and will be removed in a future version. Check index.inferred_type directly instead.
>>> ks.Index([1, 2, 3]).inferred_type
'integer'

>>> ks.Index([1.0, 2.0, 3.0]).inferred_type
'floating'

>>> ks.Index(['a', 'b', 'c']).inferred_type
'string'

>>> ks.Index([True, False, True, False]).inferred_type
'boolean'

@HyukjinKwon HyukjinKwon merged commit d6e417d into databricks:master Sep 3, 2020
@itholic itholic deleted the i_inferred_type branch September 10, 2020 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants