Skip to content

Commit 4393954

Browse files
authored
Merge pull request pandas-dev#780 from shashank88/zero_column_fix
Fix pandas-dev#777: Handle zero columns when converting to unicode
2 parents 42f9277 + e33309c commit 4393954

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arctic/serialization/numpy_records.py

Lines changed: 2 additions & 2 deletions
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)