Skip to content

Commit 114b2c2

Browse files
committed
Use proper python2 compatiable string check
1 parent 912ac5e commit 114b2c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def consensus_name_attr(objs):
6969
def clean_column_name_with_spaces(name):
7070
"""Check if name contains any spaces, if it contains any spaces
7171
the spaces will be removed and an underscore suffix is added."""
72-
if not isinstance(name, str) or " " not in name:
72+
if not isinstance(name, compat.string_types) or " " not in name:
7373
return name
7474
return name.replace(" ", "_") + "_"
7575

0 commit comments

Comments
 (0)