wesm/pandas — Issue #325: to_string on DataFrame may print columns in the wrong order
Author: craustin
Created: 2011-11-02 21:17:27+00:00
State: open

d = {'a': [1,2,3], 'b':[4,5,6]}
from pandas import DataFrame
df = DataFrame(d)

df.to_string()
# a b
# 0 1 4
# 1 2 5
# 2 3 6

df.to_string(columns=['b','a'])
# a b
# 0 4 1
#1 5 2
# 2 6 3