Skip to content

Commit c0880d6

Browse files
committed
added workaround for supporting string in Python 2.7
1 parent a100204 commit c0880d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

larray/inout/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from datetime import date, time, datetime
55
from collections import OrderedDict
66

7-
from larray.util.compat import basestring
7+
from larray.util.compat import basestring, PY2
88
from larray.core.axis import Axis
99
from larray.core.group import Group
1010
from larray.core.array import Array
@@ -18,6 +18,8 @@
1818
_supported_scalars_types = (int, float, bool, basestring, date, time, datetime)
1919
_supported_types = _supported_larray_types + _supported_scalars_types
2020
_supported_typenames = {cls.__name__ for cls in _supported_types}
21+
if PY2:
22+
_supported_typenames.add('str')
2123

2224

2325
def _get_index_col(nb_axes=None, index_col=None, wide=True):

0 commit comments

Comments
 (0)