Facing error in Test Cases

Error:
df.alcohol[0]_check: Value is not as expected. Please check quality interval.
Expected: 9.4
Result: 9.1
Please open utils.py if you want to see the unit test here.

df.alcohol[100]_check: Value is not as expected. Please check quality interval.
Expected: 10.9
Result: 12.5
Please open utils.py if you want to see the unit test here.

0 Tests passed
2 Tests failed

Exception Traceback (most recent call last)
in
----> 1 utils.test_df_drop(df)
2

~/work/release/W1_Assignment/utils.py in test_df_drop(df)
94 ]
95
—> 96 test_loop(test_cases)
97
98 def test_data_sizes(train_size, test_size, val_size):

~/work/release/W1_Assignment/utils.py in test_loop(test_cases)
25 print(‘\033[92m’, success," Tests passed")
26 print(‘\033[91m’, fails, " Tests failed")
—> 27 raise Exception(“Please check the error messages above.”)
28
29 def test_white_df(white_df):

Exception: Please check the error messages above.

Hello @Ranjit_Raj

Please make sure you have recalled the below code line with the correct code

URL of the white wine dataset
You probably have some error in the cells related to utils.test_white_df(white_df) as well as red_df (as both of your test shows different output than the expected. (have you recalled it as wine quality or wine type? it should be quality.

make sure you followed the instruction given in the assignment is followed

You will add a new column named is_red in your dataframe to indicate if the wine is white or red for white_df

  • In the white wine dataset, you will fill the column is_red with zeros (0).

next you should drop the duplicates mentioned with keep=first

Next in utils test red_df
same URL check if recalled correctly
then while loading the data use the sep correctly
you will fill in the column is_red with ones (1)
Drop the duplicates as mentioned in white_df

Let me know if you still have doubt

Regards
DP