[BUG] to_csv() cols parameter not working properly. #3454
Labels
Bug
IO Data
IO issues that don't fit into a more specific label
Regression
Functionality that used to work in a prior pandas version
Milestone
pandas version: 0.11
python version: 2.7.4
platforms: linux & windows
When using cols parameter of to_csv() method only the order of the header is changed, while actual values are not.
Expected output:
date_time,X2,X1
2013-01-01 00:30:00,0.4,0.1
2013-01-01 01:00:00,0.3,0.2
2013-01-01 01:30:00,0.2,0.3
2013-01-01 02:00:00,0.1,0.4
Actual output:
date_time,X2,X1
2013-01-01 00:30:00,0.1,0.4
2013-01-01 01:00:00,0.2,0.3
2013-01-01 01:30:00,0.3,0.2
2013-01-01 02:00:00,0.4,0.1
date_time,X2
2013-01-01 00:30:00,0.1
2013-01-01 01:00:00,0.2
2013-01-01 01:30:00,0.3
2013-01-01 02:00:00,0.4
date_time
2013-01-01 00:30:00 0.1
2013-01-01 01:00:00 0.2
2013-01-01 01:30:00 0.3
2013-01-01 02:00:00 0.4
Name: X1, dtype: float64
date_time
2013-01-01 00:30:00 0.4
2013-01-01 01:00:00 0.3
2013-01-01 01:30:00 0.2
2013-01-01 02:00:00 0.1
Name: X2, dtype: float64
The text was updated successfully, but these errors were encountered: