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

Copy numpy array into Panda multiindex (same size)
Average Previous and Current Row - Pandas
seaborn pointplot above swarmplot
Edit field and append value to a python dataframe column
column_stack returns non cotiguous array
pandas: conditionally select a row cell for each column based on a mask
pandas custom function apply on melted dataframe
How to check for boolean codition in pandas dataframe
Reading batches of data from BigQuery into Datalab
Jupyter/ipywidgets sorting dataframe on two levels
Groupby.sum() giving ValueError: overflow in timedelta operation
Why does DataFrameGroupBy.boxplot method throw error when given argument “subplots=True/False”?
Calculate age in months - optimize date transformations in pandas
pandas: list of dictionaries grouped by key from df
Pandas data frames and matplotlib.pyplot
Pandas.to_csv thousand separator

Categories

HOME
vbscript
layout
vmware
malloc
jgroups
jpeg
jxls
angular-ui-bootstrap
echarts
contact
reveal.js
numeral.js
etl
undefined
jqwidget
oxyplot
samoa
custom-wordpress-pages
visjs
ml
mustache.php
trading
crystal-reports-2010
pepper
poltergeist
web-api-testing
ejabberd-module
semantic-versioning
copying
typed.js
vsts-build-task
environment-modules
catalog
nssegmentedcontrol
bytecode-manipulation
ios5
simplexml
dartium
adobe-premiere
withings
abstract-class
streamsets
xenforo
az-application-insights
sql-server-agent
janrain
nxlog
estimote
vao
node-sass
skeleton-css-boilerplate
upstart
fancybox-2
idisposable
flutterwave
color-profile
vtigercrm
time-and-attendance
transmitfile
django-debug-toolbar
qgraphicsview
pickadate
pagerank
ptrace
xpath-1.0
wapiti
photobucket
netmq
qtableview
lib.web.mvc
ora-00900
apache-commons-fileupload
e10s
website-monitoring
block-device
codeigniter-routing
id3v2
client-side-templating
gulp-less
aapt
contenttype
fluentautomation
uv-mapping
quartz-graphics
dataservice
jplaton
ora-00911
delphi-6
dmoz
libstdc++
isnullorempty
hosts-file
osql
dotnethighcharts
spring-portlet-mvc
custom-backend
locationlistener
servicehost
putchar
w3wp
wsdl.exe
ntvdm.exe

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