Skip to content

Commit

Permalink
handle index types
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Jun 18, 2019
1 parent 036b156 commit 965224e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dask/dataframe/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def _validate(self, series):

@property
def _accessor(self):
return getattr(self._series._meta, self._accessor_name)
meta = self._series._meta
if hasattr(meta, 'to_series'): # is index-like
meta = meta.to_series()
return getattr(type(meta), self._accessor_name)

@staticmethod
def _delegate_property(obj, accessor, attr):
Expand Down

0 comments on commit 965224e

Please sign in to comment.