Skip to content

Commit

Permalink
Remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
aheldes committed Aug 22, 2022
1 parent a24e30a commit 952446a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ def get_data(date_list):

# Loop through dates
for day in date_list[::-1]:
print(day)
# Create start and end date in ISO format
start = datetime.combine(day, time(00, 00, 00, 000000)).isoformat()
end = datetime.combine(day, time(23, 59, 59, 999999)).isoformat()
Expand All @@ -178,7 +177,7 @@ def get_data(date_list):

# Get response json
data = get.json()
print(data)

# Load response into results
results['billingEntries'].extend(data['billingEntries'])
number_of_results = len(data['billingEntries'])
Expand All @@ -197,7 +196,7 @@ def get_data(date_list):
def parse_biling_entries(data):
# Crate df from dictionary
df = pd.DataFrame.from_dict(data['billingEntries'])
print(df.head())

# Parse all nested dictionaries into columns
df['typeID'] = df['type'].apply(lambda x: x.get('id'))
df['typeName'] = df['type'].apply(lambda x: x.get('name'))
Expand Down Expand Up @@ -232,7 +231,6 @@ def parse_biling_entries(data):

# Get date list
date_list = date_range_list(start_date, stop_date)
print(start_date, stop_date, date_list)

# Get results
logging.info('Hitting endpoint for each date.')
Expand Down

0 comments on commit 952446a

Please sign in to comment.