You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good point. Currently the passed columns is only used to filter the columns, not actually specify an order. Obviously this is a bug, will be a simple fix (feel free to submit a pull request w/ tests if I don't get to it in the next couple days)
d = {'a': [1,2,3], 'b':[4,5,6]}
from pandas import DataFrame
df = DataFrame(d)
df.to_string()
Returns:
a b
0 1 4
1 2 5
2 3 6
df.to_string(columns=['b','a'])
Returns:
a b
0 4 1
1 5 2
2 6 3
The text was updated successfully, but these errors were encountered: