Created
April 22, 2022 07:20
-
-
Save lordlinus/cf7cd7d210b3ba1fe60d0f19a387e1c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import os | |
folder_path = "/os/folder/path" | |
summaryDF = pd.DataFrame() | |
data = pd.concat( | |
[ | |
pd.read_excel(os.path.join(folder_path, f), sheet_name="Data") | |
for f in os.listdir(folder_path) | |
], | |
ignore_index=True, | |
) | |
df = data.query('ServiceName=="Bandwidth" or ServiceName=="Virtual Network"') | |
df['CleanCost'] = df['Cost'].apply(lambda x: x.replace('$', '').replace('<', '')) | |
df[["ServiceTier","Meter","CleanCost"]].to_csv('summary_2.csv', index=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment