Skip to content

Commit

Permalink
Update Export-to-csv.py
Browse files Browse the repository at this point in the history
Have to remove pseudo code, now commented out.
  • Loading branch information
sean-eagles authored Sep 21, 2023
1 parent 6887770 commit 8e770e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Export-to-csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ def open_S3_file_as_df(bucket_name, file_name):

df = open_S3_file_as_df(bucket_name, file_name)
print(f'The shape of the raw metadata parquet dataset is {df.shape}')
print("DataFrame: " + str(df))


"""
# Add a new column to log the process, and loop through the pandas rows to assign values
df['process_log'] = ''
Expand All @@ -53,7 +54,7 @@ def open_S3_file_as_df(bucket_name, file_name):
df.at[index, 'process_log'] = 'Success' # or 1
else:
df.at[index, 'process_log'] = 'Fail' # or 0

"""
# Save all the records as a CSV to local path
save_path = os.path.join(os.getcwd(), 'records.csv')
df.to_csv(save_path)

0 comments on commit 8e770e7

Please sign in to comment.