def assert_sp_frame_equal(left, right, check_dtype=True, exact_indices=True, check_frame_type=True, obj='SparseDataFrame'):
 assertIsInstance(left, pd.SparseDataFrame, '[SparseDataFrame]')
 assertIsInstance(right, pd.SparseDataFrame, '[SparseDataFrame]')
 if check_frame_type:
  assert_class_equal(left, right, obj=obj)
 assert_index_equal(left.index, right.index, obj='{0}.index'.format(obj))
 assert_index_equal(left.columns, right.columns, obj='{0}.columns'.format(obj))
 for (col, series) in compat.iteritems(left):
  assert (col in right)
  if exact_indices:
   assert_sp_series_equal(series, right[col], check_dtype=check_dtype)
  else:
   assert_series_equal(series.to_dense(), right[col].to_dense(), check_dtype=check_dtype)
 assert_attr_equal('default_fill_value', left, right, obj=obj)
 for col in right:
  assert (col in left)

def assert_sp_frame_equal ( left , right , check_dtype = True , exact_indices = True , check_frame_type = True , obj = 'SparseDataFrame' ) : assertIsInstance ( left , pd . SparseDataFrame , '[SparseDataFrame]' ) assertIsInstance ( right , pd . SparseDataFrame , '[SparseDataFrame]' ) if check_frame_type : assert_class_equal ( left , right , obj = obj ) assert_index_equal ( left . index , right . index , obj = '{0}.index' . format ( obj ) ) assert_index_equal ( left . columns , right . columns , obj = '{0}.columns' . format ( obj ) ) for ( col , series ) in compat . iteritems ( left ) : assert ( col in right ) if exact_indices : assert_sp_series_equal ( series , right [ col ] , check_dtype = check_dtype ) else : assert_series_equal ( series . to_dense ( ) , right [ col ] . to_dense ( ) , check_dtype = check_dtype ) assert_attr_equal ( 'default_fill_value' , left , right , obj = obj ) for col in right : assert ( col in left )
check that the left and right sparsedataframe are equal .