Skip to content

Commit 3ba6274

Browse files
authored
add back pd.StringDtype check (#67)
1 parent 4c9fdfa commit 3ba6274

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

merlin/schema/schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from typing import Dict, List, Optional, Text, Union
1818

1919
import numpy as np
20+
import pandas as pd
2021

2122
from .tags import Tags, TagSet
2223

@@ -53,6 +54,8 @@ def __post_init__(self):
5354
dtype = np.dtype(self.dtype.numpy_dtype)
5455
elif hasattr(self.dtype, "_categories"):
5556
dtype = self.dtype._categories.dtype
57+
elif isinstance(self.dtype, pd.StringDtype):
58+
dtype = np.dtype("O")
5659
else:
5760
dtype = np.dtype(self.dtype)
5861
except TypeError as err:

0 commit comments

Comments
 (0)