<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Read in the data..
Step1:  The columns are the instances and rows the features so we need to transpose the dataset.
Step2:  Read in the labels...
Step3:  We are using the OAC labeling...
Step4:  Join the data and labels on the FileName, remove any null rows and create a label column with 0s and 1s.
Step5:  Drop the FileName and OAC columns and export as a CSV file.
<ASSISTANT_TASK:>
Python Code:
data = pd.read_csv('/Users/Frankie/Documents/Dissertation/Data/pancreatic/24hProbeExpressionValues.csv')
data[:5]
Explanation: Read in the data..
End of explanation
data = data.T
Explanation: The columns are the instances and rows the features so we need to transpose the dataset.
End of explanation
label = pd.read_csv('/Users/Frankie/Documents/Dissertation/Data/pancreatic/24hTargets.csv')
label[:5]
Explanation: Read in the labels...
End of explanation
label = label[['FileName', 'OAC']]
label[:5]
Explanation: We are using the OAC labeling...
End of explanation
joined_tables = label.join(data, on='FileName', how = 'outer')
joined_tables = joined_tables[pd.notnull(joined_tables['Probe1'])]
joined_tables['label'] = np.where(joined_tables['OAC']=='Mild', 0, 1)
joined_tables[:5]
Explanation: Join the data and labels on the FileName, remove any null rows and create a label column with 0s and 1s.
End of explanation
joined_tables.drop(['FileName','OAC'], axis=1).to_csv("/Users/Frankie/Desktop/pancreatic.csv",index=False)
Explanation: Drop the FileName and OAC columns and export as a CSV file.
End of explanation
<END_TASK>