擅长:python、mysql、java
<pre><code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.DataFrame(
{'month': ['201501', '201502', '201503', '201504', '201505'],
'total_gmv': [np.nan, 2.824294e+09, 7.742665e+09, 2.024132e+10, 6.705012e+10]})
df['month'] = pd.to_datetime(df['month'], format='%Y%m').dt.month
df = df.set_index('month')
print df
df.plot(kind='bar')
plt.show()
</code></pre>
<p>结果:</p>
^{pr2}$
<p><a href="https://i.stack.imgur.com/2typa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2typa.png" alt="enter image description here"/></a></p>