|
|
@@ -352,6 +352,7 @@ def importData(pars,filename,getId=getId,modify=modify,\
|
|
|
additionalVars=pars.get('additionalVars',{})
|
|
|
idField=pars.get('idField','ParticipantId')
|
|
|
updateAlias=pars.get('updateAlias',lambda x,y: x)
|
|
|
+ copyColumns=pars.get('copyColumns',{})
|
|
|
|
|
|
fields=getFields(pars)
|
|
|
lookupVars=getVariables(fields,fieldType='LOOKUP')
|
|
|
@@ -370,6 +371,10 @@ def importData(pars,filename,getId=getId,modify=modify,\
|
|
|
|
|
|
df=pandas.read_excel(filename,sheet_name=sheet_name,skiprows=skiprows,\
|
|
|
usecols=usecols)
|
|
|
+#copy columns, useful if two data items come from the same XLS column
|
|
|
+ for col in copyColumns:
|
|
|
+ df[col]=df[copyColumns[col]]
|
|
|
+
|
|
|
vars=df.columns
|
|
|
print(vars)
|
|
|
|