wesm/pandas — Issue #232: to_string() returning None
Author: PhE
Created: 2011-10-13 16:11:54+00:00
State: open

DataFrame.to_string() is printing directly to console and not returning a string :

```Python
>>> import pandas
>>> df = pandas.DataFrame(range(5))
>>> df
0
0 0
1 1
2 2
3 3
4 4
>>> view_repr = repr(df)
>>> view_to_string = df.to_string()
0
0 0
1 1
2 2
3 3
4 4
>>> view_repr == view_to_string
False
```

For large DataFrame, we have to use to_string() to get a tabular view.
But the return value is not set (None) and can't be retrieved :

```Python
>>> view_repr
' 0\n0 0\n1 1\n2 2\n3 3\n4 4\n'
>>> view_to_string
>>>
```

It would be usefull to get a string (or StringIO) returned by DataFrame.to_string()