diff --git a/pandas/io/sql.py b/pandas/io/sql.py index ce315375dffff..e705a3b20585a 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -5,7 +5,7 @@ from __future__ import print_function from datetime import datetime, date import warnings -from pandas.compat import range, lzip, map, zip, raise_with_traceback +from pandas.compat import lzip, map, zip, raise_with_traceback, string_types import numpy as np @@ -444,7 +444,7 @@ def _index_name(self, index): return _safe_col_name(self.frame.index.name) else: return self.prefix + '_index' - elif isinstance(index, basestring): + elif isinstance(index, string_types): return index else: return None