I have dataframe like below:
month start end 0 2018-1 1000 0 1 2018-2 1100 0.1 2 2018-3 1400 0.3 3 2018-4 700 -0.5
If I would like to plot 'start' column with line, and 'end' column with bar (x axis should be month) with only using pandas plot function in same graph, how should I do that? + for bar chart, it would be preferred to have the chart with a black horizontal line at end=0, and bars color-coded such that positive returns are green and negative returns are red.
I started to try
ax = df.plot(figsize=(10,5), x='month', y='start') df.plot(figsize=(10,5), x='month', y='end', kind='bar', ax=ax) ax pass
But it looked not what I wanted. Thanks in advance!