Sameer, thank you so much for your knowledge sharing! Small comment according Mode computation. Mode for group of numbers with same frequency should be calculated as mean [6, 2, 6, 6, 8, 9, 9, 9, 0] (6+9)/2=7,5. So code return min(mode) should be replaced with return np.mean(mode)
Roman Kushnirenko
Sameer, thank you so much for your knowledge sharing! Small comment according Mode computation. Mode for group of numbers with same frequency should be calculated as mean [6, 2, 6, 6, 8, 9, 9, 9, 0] (6+9)/2=7,5. So code
return min(mode)should be replaced withreturn np.mean(mode)