diff --git a/collection/aws/ec2_collector/join_data.py b/collection/aws/ec2_collector/join_data.py index e22c846..ee9c893 100644 --- a/collection/aws/ec2_collector/join_data.py +++ b/collection/aws/ec2_collector/join_data.py @@ -21,11 +21,11 @@ def build_join_df(spot_price_df, ondemand_price_df, spotinfo_df, sps_df): join_df = pd.merge(join_df, spotinfo_df, how="outer") join_df['Savings'] = 100.0 - (join_df['SpotPrice'] * 100 / join_df['OndemandPrice']) - join_df['Savings'] = join_df['Savings'].fillna(0) - join_df['SPS'] = join_df['SPS'].fillna(0) - join_df['SpotPrice'] = join_df['SpotPrice'].fillna(0) - join_df['OndemandPrice'] = join_df['OndemandPrice'].fillna(0) - join_df['IF'] = join_df['IF'].fillna(0) + join_df['Savings'] = join_df['Savings'].fillna(-1) + join_df['SPS'] = join_df['SPS'].fillna(-1) + join_df['SpotPrice'] = join_df['SpotPrice'].fillna(-1) + join_df['OndemandPrice'] = join_df['OndemandPrice'].fillna(-1) + join_df['IF'] = join_df['IF'].fillna(-1) join_df['Savings'] = join_df['Savings'].astype('int') join_df['SPS'] = join_df['SPS'].astype('int')