-
-
Save amankharwal/80ea207d5024669f3f6873911b5ead96 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
your_name = "Aman Kharwal" # at least 5 characters | |
def customize_dataset(dataframe_raw, rand_str): | |
dataframe = dataframe_raw.copy(deep=True) | |
# drop some rows | |
dataframe = dataframe.sample(int(0.95*len(dataframe)), random_state=int(ord(rand_str[0]))) | |
# scale input | |
dataframe.Year = dataframe.Year * ord(rand_str[1])/100. | |
# scale target | |
dataframe.Selling_Price = dataframe.Selling_Price * ord(rand_str[2])/100. | |
# drop column | |
if ord(rand_str[3]) % 2 == 1: | |
dataframe = dataframe.drop(['Car_Name'], axis=1) | |
return dataframe | |
dataframe = customize_dataset(dataframe_raw, your_name) | |
dataframe.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment