@@ -168,22 +168,18 @@ def test_concat(self):
168
168
169
169
res = pd .concat ([sparse , sparse ])
170
170
exp = pd .concat ([self .dense1 , self .dense1 ]).to_sparse (fill_value = 0 )
171
- exp ._default_fill_value = np .nan
172
171
tm .assert_sp_frame_equal (res , exp )
173
172
174
173
res = pd .concat ([sparse2 , sparse2 ])
175
174
exp = pd .concat ([self .dense2 , self .dense2 ]).to_sparse (fill_value = 0 )
176
- exp ._default_fill_value = np .nan
177
175
tm .assert_sp_frame_equal (res , exp )
178
176
179
177
res = pd .concat ([sparse , sparse2 ])
180
178
exp = pd .concat ([self .dense1 , self .dense2 ]).to_sparse (fill_value = 0 )
181
- exp ._default_fill_value = np .nan
182
179
tm .assert_sp_frame_equal (res , exp )
183
180
184
181
res = pd .concat ([sparse2 , sparse ])
185
182
exp = pd .concat ([self .dense2 , self .dense1 ]).to_sparse (fill_value = 0 )
186
- exp ._default_fill_value = np .nan
187
183
tm .assert_sp_frame_equal (res , exp )
188
184
189
185
def test_concat_different_fill_value (self ):
@@ -197,7 +193,6 @@ def test_concat_different_fill_value(self):
197
193
198
194
res = pd .concat ([sparse2 , sparse ])
199
195
exp = pd .concat ([self .dense2 , self .dense1 ]).to_sparse (fill_value = 0 )
200
- exp ._default_fill_value = np .nan
201
196
tm .assert_sp_frame_equal (res , exp )
202
197
203
198
def test_concat_different_columns (self ):
@@ -220,12 +215,10 @@ def test_concat_different_columns(self):
220
215
221
216
res = pd .concat ([sparse , sparse3 ])
222
217
exp = pd .concat ([self .dense1 , self .dense3 ]).to_sparse (fill_value = 0 )
223
- exp ._default_fill_value = np .nan
224
218
tm .assert_sp_frame_equal (res , exp )
225
219
226
220
res = pd .concat ([sparse3 , sparse ])
227
221
exp = pd .concat ([self .dense3 , self .dense1 ]).to_sparse (fill_value = 0 )
228
- exp ._default_fill_value = np .nan
229
222
tm .assert_sp_frame_equal (res , exp )
230
223
231
224
# different fill values
@@ -264,13 +257,11 @@ def test_concat_series(self):
264
257
res = pd .concat ([sparse , sparse2 [col ]])
265
258
exp = pd .concat ([self .dense1 ,
266
259
self .dense2 [col ]]).to_sparse (fill_value = 0 )
267
- exp ._default_fill_value = np .nan
268
260
tm .assert_sp_frame_equal (res , exp )
269
261
270
262
res = pd .concat ([sparse2 [col ], sparse ])
271
263
exp = pd .concat ([self .dense2 [col ],
272
264
self .dense1 ]).to_sparse (fill_value = 0 )
273
- exp ._default_fill_value = np .nan
274
265
tm .assert_sp_frame_equal (res , exp )
275
266
276
267
def test_concat_axis1 (self ):
@@ -294,13 +285,13 @@ def test_concat_axis1(self):
294
285
res = pd .concat ([sparse , sparse3 ], axis = 1 )
295
286
exp = pd .concat ([self .dense1 , self .dense3 ],
296
287
axis = 1 ).to_sparse (fill_value = 0 )
297
- exp ._default_fill_value = np .nan
288
+ # exp._default_fill_value = np.nan
298
289
tm .assert_sp_frame_equal (res , exp )
299
290
300
291
res = pd .concat ([sparse3 , sparse ], axis = 1 )
301
292
exp = pd .concat ([self .dense3 , self .dense1 ],
302
293
axis = 1 ).to_sparse (fill_value = 0 )
303
- exp ._default_fill_value = np .nan
294
+ # exp._default_fill_value = np.nan
304
295
tm .assert_sp_frame_equal (res , exp )
305
296
306
297
# different fill values
0 commit comments