Ejemplo n.º 1
0
def test_combine3():
	testing_df = df.copy()
	result_df = df.copy()
	with pytest.raises(Exception):
		clean.combineColumns(testing_df, ['col1', 'col16'], seperator=' ', newName="combined")
Ejemplo n.º 2
0
def test_combine1():
	testing_df = df.copy()
	result_df = df.copy()
	clean.combineColumns(testing_df, ['col1', 'col2'], seperator=' ', newName="combined")
	result_df.insert(0, 'combined', ['1.0 1.0', '2.0 2.0', '2.0', '3.0', '4.0 4.0'], allow_duplicates=True)
	assert (((testing_df.fillna(0) == result_df.fillna(0)).all()).all()) == True