Skip to content

Commit a73067e

Browse files
committed
added a line to save out all_melt to a .csv, also added some print lines to show progress
1 parent c161646 commit a73067e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

sb125_analyses/sb125_fund_split_analysis/fund_split.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -619,11 +619,12 @@ def fund_request_melt(df):
619619

620620

621621
if __name__ == "__main__":
622-
622+
print("running fund_request_checker_v3()")
623623
good_list, review_list = fund_request_checker_v3(file_list)
624624

625625
cleaned_fund_request = cleaner_loop(good_list)
626626

627+
print("running individual cleaning scripts")
627628
#these functions clean specific values (DFs) in the cleaned_fund_request dict
628629
clean_humboldt()
629630

@@ -658,13 +659,20 @@ def fund_request_melt(df):
658659

659660
# concat all values (DFs) from cleaned_fund_request dict to be a single DF and concat the rest of the DFs
660661

662+
print("running concat_everything")
661663
all_fund_requests = concat_everything()
662664

665+
print("saving data as .parquet and .csv to GCS")
663666
# SAVING TO GCS!
664667
all_fund_requests.to_parquet(f"{GCS_PATH}all_fund_requests_concat.parquet")
665668

666669
#melt all fund requests
667670
all_melt = fund_request_melt(all_fund_requests)
668671

669672
#saving to gcs
670-
all_melt.to_parquet(f"{GCS_PATH}all_fund_requests_melt.parquet")
673+
all_melt.to_parquet(f"{GCS_PATH}all_fund_requests_melt.parquet")
674+
675+
# saving all_melt to csv
676+
all_melt.to_csv(f"{GCS_PATH}all_fund_requests_melt.csv", index=False)
677+
678+
print("end of script")

0 commit comments

Comments
 (0)