title: How to assign color value using plotly based on column value?
body: <p>I am trying to plot k-means cluster using plotly, but i am having trouble in assigning colors based on there groups? I have following data frame.</p>
  
  <p><a href="https://i.stack.imgur.com/lv5uo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lv5uo.png" alt="enter image description here"></a></p>
  
  <p>group: cluster number</p>
  
  <p>I am using this for scatter plot in plotly.</p>
  
  <pre class="lang-py prettyprint-override"><code>clustered.iplot(kind='scatter',x='value1',y='value2', colors = {'[clustered['group']==1]':'green', '[clustered['group']==0]':'yellow'},mode='markers',size=10)
  </code></pre>
  
  <p>Its wrong because it will only get True and false for color dict object. How i can can associate these group values so that color of points appear differently in the plot.</p>