I have a Panda data frame
X =
id var1 var2
0 20000049588638 3 61.62
1 100798486386 3 61.62
2 100799238114 3 61.62
I want to convert this as a simple 2D array so that I can write this into Teradata database
Required Output
X =
[(20000049588638,3,61.62),
(100798486386,3,61.62),
(100799238114,3,61.62)]
I tried this:
X = X.values.tolist()
But, I am getting following output:
[[20000049588638, '3', '61.62'],
[100798486386, '3', '61.62'],
[100799238114, '3', '61.62']]
Which I am not able to write into the database.
Please check this.