I was trying to plot a bar diagram with first 10 bars green and last 10 bars red colors.
Here is my code:
import pandas as pd
import numpy as np
df = pd.DataFrame({'c0':np.arange(20)})
my_colors = ['g','g','g','g','g',
'g','g','g','g','g',
'r','r','r','r','r',
'r','r','r','r','r']
df.plot(kind='bar', color=my_colors)
How can the problem be solved?
pd.__version__
'0.23.4'


