Skip to content

Commit

Permalink
Explicitly not support codes and levels property for MultiIndex (#952)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesdong1991 authored and HyukjinKwon committed Nov 18, 2019
1 parent a0fc9af commit 169e38e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions databricks/koalas/missing/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ class _MissingPandasLikeMultiIndex(object):

# Properties
T = unsupported_property('T')
codes = unsupported_property('codes')
is_all_dates = unsupported_property('is_all_dates')
levels = unsupported_property('levels')
levshape = unsupported_property('levshape')
shape = unsupported_property('shape')

Expand Down Expand Up @@ -225,6 +223,16 @@ class _MissingPandasLikeMultiIndex(object):
# Functions we won't support.
values = common.values(unsupported_property)
array = common.array(unsupported_property)
codes = unsupported_property(
'codes',
reason="'codes' requires to collect all data into the driver which is against the "
"design principle of Koalas. Alternatively, you could call 'to_pandas()' and"
" use 'codes' property in pandas.")
levels = unsupported_property(
'levels',
reason="'levels' requires to collect all data into the driver which is against the "
"design principle of Koalas. Alternatively, you could call 'to_pandas()' and"
" use 'levels' property in pandas.")
__iter__ = common.__iter__(unsupported_function)

# Properties we won't support.
Expand Down

0 comments on commit 169e38e

Please sign in to comment.