From adcf9630923be74dd05d39352ed6ae9f697e9fbb Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 17 Jul 2015 12:07:38 -0400 Subject: [PATCH] dont store full name, use first and last later --- attribution.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/attribution.py b/attribution.py index b9fe9e5..ddf6044 100644 --- a/attribution.py +++ b/attribution.py @@ -57,7 +57,7 @@ class AttributionReport(object): self.REQUIRED_DP_COLUMNS = ["Org Name", "Deposit ID", "Plasmid ID", "PI_Name", "Date Received"] # After load and merging, delete these columns - self.SF_TRIM_COLUMNS = ["Subject", "First Name", "Last Name", "Created Date", "LIMS Organization ID", + self.SF_TRIM_COLUMNS = ["Subject", "Created Date", "LIMS Organization ID", "Account Description"] self.DP_TRIM_COLUMNS = ["Org ID", "Deposit Status", "PI_ID", "Date Available", "# Orders", "# Plasmids in the Deposit", "Addgene Contact", "Country"] @@ -130,7 +130,6 @@ class AttributionReport(object): # Clean up Salesforce salesforce_df.sort(self.SF_DATE_COLUMN, ascending=1) - salesforce_df["Full Name"] = salesforce_df["First Name"].map(unicode) + " " + salesforce_df["Last Name"] # Cleanup Deposit Data deposit_df['Org Name'].fillna('', inplace=True) @@ -203,7 +202,7 @@ class AttributionReport(object): filtered_df = deposit_df.ix[start:end] # Variables for short names, and not having to type index a lot. - pi_name = unicode(sf_row['Full Name']) + pi_name = unicode(sf_row['First Name'] + " " + sf_row['Last Name']) pi_org = sf_row['Account Name'] # Get matches by the PI's name