How to return a string from pandas.DataFrame.info() : <p>I would like to display the output from <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.info.html" rel="noreferrer"><code>pandas.DataFrame.info()</code></a> on a <code>tkinter</code> text widget so I need a string. However <code>pandas.DataFrame.info()</code> returns <code>NoneType</code> is there anyway I can change this?</p>

<pre><code>import pandas as pd
import numpy as np

data = np.random.rand(10).reshape(5,2)
cols = 'a', 'b'
df = pd.DataFrame(data, columns=cols)
df_info = df.info()
print(df_info)
type(df_info)
</code></pre>

<p>I'd like to do something like:</p>

<pre><code>info_str = ""
df_info = df.info(buf=info_str)
</code></pre>

<p>Is it possible to get <code>pandas</code> to return a string object from <code>DataFrame.info()</code>?</p>
