I have written the following code and I want to write the output into a csv file. How can I do this? Thanks for helping me. Here is an extract from my code:
columnNames = ['Stride Length', 'Stand Duration', 'Swing Duration', 'Douple Support Time', 'Relation Swing Stand']
resultsPerRowRatio = list()
for i in range(len(stepData)):
stepDataLeft = stepData.to_numpy()[i, 0:5]
stepDataRight = stepData.to_numpy()[i, 5:10]
dataF = pd.DataFrame({'stepDataLeft': stepDataLeft, 'stepDataRight': stepDataRight}, index=columnNames)
#Symmetry Ratio:
dataF['Symmetry Ratio Row']=np.where(dataF['stepDataLeft'] < dataF['stepDataRight'],sv.symmetryRatio(dataF['stepDataLeft'],dataF['stepDataRight']), sv.symmetryRatio(dataF['stepDataRight'],dataF['stepDataLeft']))
resultsPerRowRatio.append(dataF)
print("Symmetry Ratio: "+str(resultsPerRowRatio))
This is my output:
I want to write this in a csv file. But I don't know how. I have already tried various options.
