Skip to content

Commit f0fbf7d

Browse files
committed
fix issue pandas-dev#113 and issue pandas-dev#121
1 parent 95c6356 commit f0fbf7d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

arctic/store/_ndarray_store.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def write(self, arctic_lib, version, symbol, item, previous_version, dtype=None)
387387
version['sha'] = self.checksum(item)
388388

389389
if previous_version:
390-
if version['dtype'] == str(dtype) \
390+
if previous_version['dtype'] == str(dtype) \
391391
and 'sha' in previous_version \
392392
and self.checksum(item[:previous_version['up_to']]) == previous_version['sha']:
393393
#The first n rows are identical to the previous version, so just append.

arctic/store/_pandas_ndarray_store.py

+6
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ def _index_to_records(self, df):
5353
if n is None:
5454
index_names[i] = 'level_%d' % count
5555
count += 1
56+
log.info("Level in MultiIndex has no name, defaulting to %s" % index_names[i])
5657
elif index_names[0] is None:
5758
index_names = ['index']
59+
log.info("Index has no name, defaulting to 'index'")
5860

5961
metadata['index'] = index_names
6062

@@ -244,6 +246,8 @@ class PandasSeriesStore(PandasStore):
244246
TYPE = 'pandasseries'
245247

246248
def _column_data(self, s):
249+
if s.name is None:
250+
log.info("Series has no name, defaulting to 'values'")
247251
columns = [s.name if s.name else 'values']
248252
column_vals = [s.values]
249253
return columns, column_vals
@@ -278,6 +282,8 @@ class PandasDataFrameStore(PandasStore):
278282

279283
def _column_data(self, df):
280284
columns = list(map(str, df.columns))
285+
if columns != df.columns:
286+
log.info("Dataframe column names converted to strings")
281287
column_vals = [df[c].values for c in df.columns]
282288
return columns, column_vals
283289

0 commit comments

Comments
 (0)