I have the following code:
df1['salary'].groupby(df1['job']).mean().plot(kind='line')
This gives one line as output. I want to have two lines in the output based on another column which is gender.
I tried the following code, but it did not work.
df1['salary'].groupby(df1['job']).mean().plot(kind='line', color=df1['gender'])
I would appreciate if anyone can help me.