построение функции pandas groupby [duplicate]

Просто используйте RecyclerView внутри DrawerLayout вместо NavigationView.

3
задан jezrael 29 May 2016 в 20:44
поделиться

1 ответ

IIUC вам нужно Series.plot.bar :

#pandas 0.17.0 and above
s.plot.bar()
#pandas below 0.17.0
s.plot('bar')

Образец:

import pandas as pd
import matplotlib.pyplot as plt

s = pd.Series({16976: 2, 1: 39, 2: 49, 3: 187, 4: 159, 
               5: 158, 16947: 14, 16977: 1, 16948: 7, 16978: 1, 16980: 1},
               name='article_id')
print (s)
1         39
2         49
3        187
4        159
5        158
16947     14
16948      7
16976      2
16977      1
16978      1
16980      1
Name: article_id, dtype: int64


s.plot.bar()

plt.show()

6
ответ дан jezrael 23 August 2018 в 22:38
поделиться
Другие вопросы по тегам:

Похожие вопросы: