Skip to content

Commit

Permalink
Merge pull request #11 from QuanMPhm/7/pi_csv
Browse files Browse the repository at this point in the history
Amending commit to add ability to group invoices by PIs
  • Loading branch information
naved001 authored Apr 3, 2024
2 parents 1823ed2 + 18c2770 commit 1ec80b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions process_report/process_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ def export_pi_billables(dataframe: pandas.DataFrame, output_folder):
if not os.path.exists(output_folder):
os.mkdir(output_folder)

invoice_month = dataframe['Invoice Month'][0]
invoice_month = dataframe['Invoice Month'].iat[0]
pi_list = dataframe['Manager (PI)'].unique()

for pi in pi_list:
pi_projects = dataframe[dataframe['Manager (PI)'] == pi]
pi_instituition = pi_projects['Institution'].unique()[0]
pi_instituition = pi_projects['Institution'].iat[0]
pi_projects.to_csv(output_folder + f"/{pi_instituition}_{pi}_{invoice_month}.csv")


Expand Down

0 comments on commit 1ec80b2

Please sign in to comment.