dont store full name, use first and last later

This commit is contained in:
Tyrel Souza 2015-07-17 12:07:38 -04:00
parent a9c60c8e82
commit adcf963092

View File

@ -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