pandas


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[0],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[0], marker='o', color='g')
df1[df1.delta <= 0].plot(ax=axes[0], marker='o', color='r')

Related Links

Pandas Group By With Running Total
Python pandas json 2D array
rename columns function not working in pandas
Number format column with pandas.DataFrame.to_csv()?
Matplotlib Subplot Labels Disappear
Counting rows between dates in pandas with groupby
Taking second last observed row
retrieve data from pandas dataframe if it doesn't cooccur in previous column
pandas resample MAX-VALUE with corresponding ANGLE-VALUE
Performance issues with writing data to HDFStore
Finding same value index of pandas Series
Get Maximum Value from Dataframe
Slicing in group by function
Grouping factors in python patsy
pandas Series groupby col not found
Annotate labels in pandas scatter plot

Categories

HOME
compiler-construction
gitlab
hook
amazon-ec2
ngrx
plone
rsyslog
v8
icloud
retrofit
installshield
ebean
echarts
acquia
ios-charts
directx
google-translate
facebook-php-sdk
adobe-analytics
n-gram
quickfix
hapi
circuit
django-admin
apache-metamodel
crystal-reports-2008
shared-hosting
introduction
custom-wordpress-pages
wkwebview
kvc
bootstrap-tour
shopware
apache-commons-io
tooltipster
libuv
bower-install
restlet
jquery-bootgrid
qwerty
webix-treetable
sqlite2
ensembles
g-code
jvm-languages
firebase-admin
android-mediaprojection
gpx
parentheses
hibernate-tools
atomicity
tropo
csound
slickedit
dtexec
zendesk-app
flow-control
vtigercrm
gnome-shell-extensions
word-vba-mac
color-picker
probability-density
pcf
skobbler-maps
jwplayer7
connect-by
superstack
ready-api
asp.net5
system.management
historian
unity-networking
intellij-14
pundit
sniffer
p2
c++03
nsmutabledictionary
gui-test-framework
winddk
android-nested-fragment
markers
zend-route
fluentautomation
yorick
marmalade
dealloc
jboss-weld
opcache
mylyn
jquery-mobile-dialog
wsdl-2.0
sublist
twrequest
uiviewanimation-curve
libc++
doh
xmemcached
yetanotherforum
oncheckedchanged
floating
h.323
blitz++
digest-authentication
yagni
premature-optimization
windows-live-messenger
rtml

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App