How to display specific digit in pandas dataframe
<p>I have dataframe like below</p>

<pre><code>   month
0    1
1    2
2    3
3   10 
4   11 
</code></pre>

<p>for example,I would like to display this dataframe in 2 digit like this</p>

<pre><code>     month
0     01
1     02
2     03
3     10
4     11
</code></pre>

<p>I tried many method but didn't work well. How can I get this result?</p>

<p>You can use <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.zfill.html"><code>str.zfill</code></a>:</p>

<pre><code>print (df['month'].astype(str).str.zfill(2))
0    01
1    02
2    03
3    10
4    11
Name: month, dtype: object
</code></pre>

python pandas dataframe