Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Someone help me write this code correctly~
Python
pd.pivot_table(graphics[0],index='swith_up',columns="fraction_classify",aggfunc='count',values'H',fill_value=0).plot((axs[0][0]), kind='area',legend=True, stacked=True, ylabel='b = 0.25',xlabel='i, a = 0')


I keep getting positional argument follows keyword argument

What I have tried:

I have problems correcting it.
Posted
Updated 6-Apr-22 22:53pm
v2
Comments
Nick 9 7-Apr-22 5:48am    
Solved I had not put an =sign to values'H'

1 solution

You forgot a = between values and 'H', see pandas.pivot_table — pandas 1.4.2 documentation[^].
 
Share this answer
 
Comments
Nick 9 7-Apr-22 5:20am    
I still get the same error
CPallini 7-Apr-22 5:40am    
Could you please report the exact (code and) error message?
Which version of 'pandas' are you using (xlabel, ylabel are 'new in version 1.1.0')?

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