Skip to content

Commit

Permalink
Wrap inside of except
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Apr 19, 2024
1 parent b0aee28 commit 1476fac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions holoviews/core/data/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,9 @@ def sorted_index(cls, df):
def sort_depth(cls, df):
try:
from pandas.core.indexes.multi import _lexsort_depth
except Exception:
return _lexsort_depth(df.index.codes, df.index.nlevels)
except (ImportError, AttributeError):
return 0
return _lexsort_depth(df.index.codes, df.index.nlevels)

@classmethod
def index_selection(cls, df, selection):
Expand Down

0 comments on commit 1476fac

Please sign in to comment.