Example #1
0
def test_emptyToNAN2():
	testing_df = df.copy()
	load.emptyStringToNan(testing_df, 1)
	result_df = df.copy()
	assert  (((testing_df.fillna(0) == result_df.fillna(0)).all()).all()) == True
Example #2
0
def test_emptyToNAN1():
	testing_df = df.copy()
	load.emptyStringToNan(testing_df, 0)
	result_df = df.copy()
	result_df['col1'].replace(to_replace="", value=np.nan, inplace=True)
	assert  (((testing_df.fillna(0) == result_df.fillna(0)).all()).all()) == True