Skip to content

Commit 5be5ec0

Browse files
committed
fix
1 parent b727d6c commit 5be5ec0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/io/pytables.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
is_extension_array_dtype,
7373
is_integer_dtype,
7474
is_list_like,
75+
is_object_dtype,
7576
is_string_dtype,
7677
is_timedelta64_dtype,
7778
needs_i8_conversion,
@@ -2560,7 +2561,7 @@ class DataIndexableCol(DataCol):
25602561
is_data_indexable = True
25612562

25622563
def validate_names(self) -> None:
2563-
if not Index(self.values).is_object():
2564+
if not is_object_dtype(Index(self.values)):
25642565
# TODO: should the message here be more specifically non-str?
25652566
raise ValueError("cannot have non-object label DataIndexableCol")
25662567

0 commit comments

Comments
 (0)