This commit is contained in:
s470611 2021-05-12 11:42:17 +02:00
parent 7ae168e1cb
commit e41231f1ea
3 changed files with 1997 additions and 1996 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6,9 +6,10 @@ import numpy as np
brands = None brands = None
def process_data(df): def process_data(df):
df["age"] = df.year.apply(lambda x: np.sqrt(2017-x)) df["age"] = 2018 - df["year"]
df["sqrt_mileage"] = df.mileage.apply(lambda x: np.sqrt(x)) df["sqrt_age"] = df.age**0.7
df["sqrt_engine_capacity"] = df.engine_capacity.apply(lambda x: np.sqrt(x)) df["sqrt_mileage"] = df.mileage ** 0.7
df["sqrt_engine_capacity"] = df.engine_capacity ** 0.7
global brands global brands
if not brands: if not brands:
brands = df.brand.value_counts()[:35].index.tolist() brands = df.brand.value_counts()[:35].index.tolist()

File diff suppressed because it is too large Load Diff