Skip to content

Commit

Permalink
update azure collector fix regioin column
Browse files Browse the repository at this point in the history
  • Loading branch information
red0sena committed Oct 17, 2023
1 parent 6862679 commit ba2a005
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ def collect_price_with_multithreading():

price_df = pd.DataFrame(price_list)
savings_df = preprocessing_price(price_df)
savings_df = savings_df.drop_duplicates(subset=['InstanceTier', 'InstanceType', 'Region'], keep='first')
savings_df = savings_df.drop_duplicates(subset=['InstanceTier', 'InstanceType', 'Region'], keep='first', inplace=True)

return savings_df
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def update_latest(data, timestamp):
# Save raw data in S3
def save_raw(data, timestamp):
data['Time'] = timestamp.strftime("%Y-%m-%d %H:%M:%S")
data = data[['Time','InstanceTier','InstanceType','OndemandPrice','SpotPrice', 'IF', 'Savings']]
data = data[['Time','InstanceTier','InstanceType', 'Region', 'OndemandPrice','SpotPrice', 'IF', 'Savings']]

data.to_csv(f"{AZURE_CONST.SERVER_SAVE_DIR}/{timestamp}.csv.gz", index=False, compression="gzip")

Expand Down

0 comments on commit ba2a005

Please sign in to comment.