Created
December 11, 2020 19:07
-
-
Save Muhammad4hmed/4d8584256e5fc5874d628f7b36d184c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rounding(num): | |
round_num, round_num2 = 0, 0 | |
uniques = np.sort(np.unique(train['price'])) | |
for i,n in enumerate(uniques): | |
if n > num: | |
break | |
round_num = n | |
round_num2 = uniques[i+1] | |
return (round_num+round_num2)/2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment