Skip to content

Commit a98e2c2

Browse files
committed
FIX: mapping by type -> checking instance
1 parent d60d082 commit a98e2c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/io/pytables.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1646,8 +1646,10 @@ def error(t):
16461646
"nor a value are passed"
16471647
)
16481648
else:
1649-
_TYPE_MAP = {Series: "series", DataFrame: "frame"}
1650-
pt = _TYPE_MAP[type(value)]
1649+
if isinstance(value, Series):
1650+
pt = "series"
1651+
else:
1652+
pt = "frame"
16511653

16521654
# we are actually a table
16531655
if format == "table":

0 commit comments

Comments
 (0)