Skip to content

Commit e33309c

Browse files
committed
Fix pandas-dev#777: Handle zero columns when converting to unicode
1 parent 42f9277 commit e33309c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arctic/serialization/numpy_records.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ def deserialize(self, item, force_bytes_to_unicode=False):
301301
if type(df.index[0]) == bytes:
302302
df.index = df.index.astype('unicode')
303303

304-
if type(df.columns[0]) == bytes:
305-
df.columns = df.index.astype('unicode')
304+
if not df.columns.empty and type(df.columns[0]) == bytes:
305+
df.columns = df.columns.astype('unicode')
306306

307307
return df
308308

0 commit comments

Comments
 (0)