Click here to Skip to main content
15,668,691 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
 hi i have been trying to make multiple plots nrows4 ncolumns5 using this loop function but i only get one graph what am i doing wrong.
for x in a:
    for y in b:
        pd.pivot_table (df.loc[((df ['a'] == x) & (df ['b'] == y))], index='swith_up',columns="classification", aggfunc='count',values='H', fill_value=0).plot(ax = axs[p,q], kind='area', legend=True, stacked = True, ylabel='b ={}'.format(y),xlabel= 'i, a={}'.format(x)) 

What I have tried:

pivot table but not successful
Richard MacCutchan 9-Apr-22 3:41am    
"but not successful"
What does that mean?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900