I have a pandas DataFrame with positive and negative values as a bar chart. I want to plot the positive colors \'green\' and the negative values \'red\' (very original...lol
Drawing on @Max Ghenis answer (which doesn't work for me but seems to be a minor change in the packages):
tseries = data['values'] color = (tseries > 0).apply(lambda x: 'g' if x else 'r') splot = tseries.plot.barh(color=color)
gives:
.. what you expect to see.