예제 #1
0
def test_invalid1():
	testing_df = df.copy()
	result = clean.invalidValuesInDataFrame(testing_df)
	assert (result['col1']['hasInvalidValues'] == True)
	assert (result['col1']['invalidIndices'] == [2])
	assert (result['col2']['hasInvalidValues'] == True)
	assert (result['col2']['invalidIndices'] == [3])
	assert (result['col3']['hasInvalidValues'] == False)
예제 #2
0
def test_invalid3():
	testing_df = df.copy()
	testing_df['col4'] = pd.Series([1., 2], index = [0, 4])
	result = clean.invalidValuesInDataFrame(testing_df)
	assert (result['col4']['hasInvalidValues'] == True)
	assert (result['col4']['invalidIndices'] == [1, 2, 3])
예제 #3
0
def test_invalid2():
	testing_df = df.copy()
	result =clean.invalidValuesInDataFrame(testing_df.dropna())
	assert (result['col1']['hasInvalidValues'] == False)
	assert (result['col2']['hasInvalidValues'] == False)
	assert (result['col3']['hasInvalidValues'] == False)