@@ -58,8 +58,8 @@ def _read_dictionary(self, qtype = QDICTIONARY):
58
58
59
59
return table
60
60
else :
61
- keys = keys if not isinstance (keys , pandas .Series ) else keys .as_matrix ()
62
- values = values if not isinstance (values , pandas .Series ) else values .as_matrix ()
61
+ keys = keys if not isinstance (keys , pandas .Series ) else keys .values
62
+ values = values if not isinstance (values , pandas .Series ) else values .values
63
63
return QDictionary (keys , values )
64
64
else :
65
65
return QReader ._read_dictionary (self , qtype = qtype )
@@ -168,19 +168,19 @@ def _write_pandas_series(self, data, qtype = None):
168
168
raise QWriterException ('Unable to serialize pandas series %s' % data )
169
169
170
170
if qtype == QGENERAL_LIST :
171
- self ._write_generic_list (data .as_matrix () )
171
+ self ._write_generic_list (data .values )
172
172
elif qtype == QCHAR :
173
- self ._write_string (data .replace (numpy .nan , ' ' ).as_matrix () .astype (numpy .string_ ).tostring ())
173
+ self ._write_string (data .replace (numpy .nan , ' ' ).values .astype (numpy .string_ ).tostring ())
174
174
elif data .dtype .type not in (numpy .datetime64 , numpy .timedelta64 ):
175
175
data = data .fillna (QNULLMAP [- abs (qtype )][1 ])
176
- data = data .as_matrix ()
176
+ data = data .values
177
177
178
178
if PY_TYPE [qtype ] != data .dtype :
179
179
data = data .astype (PY_TYPE [qtype ])
180
180
181
181
self ._write_list (data , qtype = qtype )
182
182
else :
183
- data = data .as_matrix ()
183
+ data = data .values
184
184
data = data .astype (TEMPORAL_Q_TYPE [qtype ])
185
185
self ._write_list (data , qtype = qtype )
186
186
0 commit comments