Mar-17-2023, 08:45 PM
Hi! I have the data like this in a .csv file:
index data
1 10
2 20
3 30
4 40
5 50
6 10
2 20
3 30
4 40
5 50
6. 60
And I would need them to be read like this in Python:
1 2 3 4 5 6
10 20 30 40 50 60
10 20 30 40 50 60
But it transposes the values and NaN appears between them as if it were 0 in a matrix:
1 2 3 4 5 6
10 NaN NaN NaN NaN. NaN
NaN 20 NaN NaN NaN NaN
NaN NaN 30 NaN NaN NaN
NaN NaN NaN 40 NaN NaN
NaN NaN NaN NaN 50 NaN
NaN NaN NaN NaN NaN 60
index data
1 10
2 20
3 30
4 40
5 50
6 10
2 20
3 30
4 40
5 50
6. 60
And I would need them to be read like this in Python:
1 2 3 4 5 6
10 20 30 40 50 60
10 20 30 40 50 60
But it transposes the values and NaN appears between them as if it were 0 in a matrix:
1 2 3 4 5 6
10 NaN NaN NaN NaN. NaN
NaN 20 NaN NaN NaN NaN
NaN NaN 30 NaN NaN NaN
NaN NaN NaN 40 NaN NaN
NaN NaN NaN NaN 50 NaN
NaN NaN NaN NaN NaN 60