Skip to content

Commit

Permalink
Added ability to group invoices by PIs
Browse files Browse the repository at this point in the history
  • Loading branch information
QuanMPhm committed Apr 1, 2024
1 parent 1823ed2 commit 18c2770
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 18c2770

Please sign in to comment.