availability.pydef clean_data(self) -> pd.DataFrame: """Cleans the price and service fees columns. NaN values in price are dropped, in service fee are assumed to be 0. The price and service fee columns are converted from Strings to integers. Has to be called before the first method which calculates min or max prices is called.""" self.df.dropna(subset=['availability 365'], inplace=True) self.df.loc[self.df["availability 365"] > 365, "availability 365"] = 365 self.df.loc[self.df["availability 365"] < 0, "availability 365"] = 0 return self.df
WAIT with REFACTORING
availability.py
def clean_data(self) -> pd.DataFrame: """Cleans the price and service fees columns. NaN values in price are dropped, in service fee are assumed to be 0. The price and service fee columns are converted from Strings to integers. Has to be called before the first method which calculates min or max prices is called.""" self.df.dropna(subset=['availability 365'], inplace=True) self.df.loc[self.df["availability 365"] > 365, "availability 365"] = 365 self.df.loc[self.df["availability 365"] < 0, "availability 365"] = 0 return self.df