Lets say I have a variable that I want to export to CSV that looked like this:
matrix([['y', 'x1', 'x2', 'x1^2', 'x2^2', 'x1 * x2', 'x1 * y', 'x2*y'],
['38.0', '0.2', '40.0', '0.04000000000000001', '1600.0', '8.0',
'7.6000000000000005', '1520.0'],
['42.0', '0.4', '40.0', '0.16000000000000003', '1600.0', '16.0',
'16.8', '1680.0'],
['41.0', '0.2', '50.0', '0.04000000000000001', '2500.0', '10.0',
'8.200000000000001', '2050.0'],
['46.0', '0.4', '50.0', '0.16000000000000003', '2500.0', '20.0',
'18.400000000000002', '2300.0'],
['46.0', '0.2', '60.0', '0.04000000000000001', '3600.0', '12.0',
'9.200000000000001', '2760.0'],
['49.0', '0.4', '60.0', '0.16000000000000003', '3600.0', '24.0',
'19.6', '2940.0'],
['262.0', '1.8000000000000003', '300.0', '0.6000000000000001',
'15400.0', '90.0', '79.80000000000001', '13250.0']], dtype='<U32')
I used:
DF = pd.DataFrame(table)
DF.to_csv("data1.csv")
And the CSV Exported looked like this :
Any help so the row contents are not stacked on just one cell?