Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Sep 21, 2020
Embed
What would you like to do?
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