Skip to content

Commit

Permalink
fixes #209
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Feb 24, 2022
1 parent 2dc4e88 commit 60560f6
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 55 deletions.
109 changes: 55 additions & 54 deletions tutorial/04_Project.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion welly/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ def to_basis(self,
Curve. The current instance in the new basis.
"""
# category data type or a string in data defaults to 'nearest'
if self.df.dtypes[0] == 'category' or self.df.applymap(type).eq(str).any()[0]:
if pd.api.types.is_categorical_dtype(self.df.iloc[:, 0]) or pd.api.types.is_string_dtype(self.df.iloc[:, 0]):
interp_kind = 'nearest'

new_curve = copy.deepcopy(self)
Expand Down

0 comments on commit 60560f6

Please sign in to comment.