ipython dataframe plotting setting color parameter?
I am trying to plot using pandas DataFrame directly as the index column will automatically change to x-axis. However, I really don't know how to set the color condition using DataFrame. i.e df1 = pd.DataFrame(b-z,index=frame1.index,columns=['delta']) colors = np.where(df1.delta>0,'g','r') df1.plot(ax=axes,marker='o',color=colors) I don't know how to make it work
what is b? what is z? from the sounds of of things you need to make two calls to plot. df1[df1.delta > 0].plot(ax=axes, marker='o', color='g') df1[df1.delta <= 0].plot(ax=axes, marker='o', color='r')
Pandas file IO Read Error
Pandas — asof() by last on DataFrame
Pandas Column Construction with np.where()
MultiIndex-based indexing in pandas
How to get the number of the most frequent value in a column?
Using pandas.ols on multiple dependent variables at once
Insert 0-values for missing dates within MultiIndex
pandas access axis by user-defined name
Trouble with groupss and aggregation
Replace MultiIndex's contents with DataFrame columns
What's the `DataFrameGroupBy`-equivalent of `dict.keys`?
How to split a dataframe according to a boolean criterion?
Pandas Rolling Computations on Sliding Windows (Unevenly spaced)
Resampling Minute data
How to get the last n row of pandas dataframe?