Skip to content

Commit 9f32653

Browse files
authored
Fix issue pandas-dev#712 - pandas deprecation warning in chunkstore serializer (pandas-dev#713)
1 parent d8bd208 commit 9f32653

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### 1.74
44
* Feature: #688 Remove Chunkstore check for issue #422
5+
* Bugfix: #712 Pandas deprecation warning in chunkstore serializer
56

67
### 1.73 (2018-11-27)
78
* Bugfix: #658 Write/append errors for Panel objects from older pandas versions

arctic/serialization/numpy_arrays.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ def _convert_types(self, a):
7474
else:
7575
mask = None
7676

77-
if infer_dtype(a) == 'mixed':
77+
if infer_dtype(a, skipna=False) == 'mixed':
7878
# assume its a string, otherwise raise an error
7979
try:
8080
a = np.array([s.encode('ascii') for s in a])
8181
a = a.astype('O')
8282
except:
8383
raise ValueError("Column of type 'mixed' cannot be converted to string")
8484

85-
type_ = infer_dtype(a)
85+
type_ = infer_dtype(a, skipna=False)
8686
if type_ in ['unicode', 'string']:
8787
max_len = max_len_string_array(a)
8888
return a.astype('U{:d}'.format(max_len)), mask
@@ -115,7 +115,7 @@ def docify(self, df):
115115
masks[str(c)] = Binary(compress(mask.tostring()))
116116
arrays.append(arr.tostring())
117117
except Exception as e:
118-
typ = infer_dtype(df[c])
118+
typ = infer_dtype(df[c], skipna=False)
119119
msg = "Column '{}' type is {}".format(str(c), typ)
120120
logging.info(msg)
121121
raise e

0 commit comments

Comments
 (0)