Closed
Description
This is a change in behavior between 0.23 and 0.25.
On 0.23.0
In [10]: s=pd.Series(['a','b','c'])
: s.to_string(index=False)
Out[10]: 'a\nb\nc'
On 0.25.0
In [2]: s=pd.Series(['a','b','c'])
: s.to_string(index=False)
Out[2]: ' a\n b\n c'
Particularly strange with a series of length 1
In [8]: s=pd.Series(['a'])
: s.to_string(index=False)
Out[8]: ' a'
There is always exactly 1 leading space regardless of how many characters the index would have taken. The same behavior appears in DataFrame.to_string
.
Is this an intended change in behavior? I'm happy to look into identifying the cause if it is not intended.
Metadata
Metadata
Assignees
Labels
No labels