title: Unable to plot Plotly - saying value of 'x' is not the name of a column
body: <p>I am trying to plot this time-series chart (a RSI chart of a few stock tickers). However, I cannot seem to get Plotly to chart at all! And it throws me the error below:</p>
  <p><code>Value of 'x' is not the name of a column in 'data_frame'. Expected one of ['Date', 'AAPL', 'GOOGL', 'IBM', 'MSFT'] but received: index To use the index, pass it in directly as **df.index**.</code></p>
  <p>I assume the problem is because of the Dataframe? And that it has a 'multi-layer index'?</p>
  <p><a href="https://i.stack.imgur.com/ffyos.png" rel="nofollow noreferrer">Screenshot of my DF</a> - <a href="https://i.imgur.com/gZY7ONP.png" rel="nofollow noreferrer">https://i.imgur.com/gZY7ONP.png</a></p>
  <p>Below is the code I had to generate a dataframe, and for plotly to plot from there. I used <code>x=data.index, y=RSI.columns</code> but it does not seem to work.</p>
  <pre><code>#List to store my ticker codes
  ticker = ['AAPL','GOOGL','IBM','MSFT']
  
  #other variables
  wrsi = ['EWMA']
  mwa = 14
  startdate = &quot;2019-01-01&quot;
  enddate = &quot;2020-10-31&quot;
  
  #pull data
  data = web.DataReader(ticker, 'yahoo', startdate, enddate)
  
  #RSI calculation
  delta = data['Adj Close'].diff(1)
  delta.dropna(inplace=True)
  
  positive = delta.copy()
  negative = delta.copy()
  
  positive[positive &lt; 0] = 0
  negative[negative &gt; 0] = 0
  
  #wrsi is ewma or sma?
  if wrsi == 'sma':
      average_gain = positive.rolling(mwa).mean()
      average_loss = abs(negative.rolling(mwa).mean())
  else:
      average_gain = positive.ewm(span=mwa).mean()
      average_loss = abs(negative.ewm(span=mwa).mean())
      
  relative_strength = average_gain / average_loss
  RSI = 100-(100/ (1+ relative_strength))
  
  
  #plot chart
  fig = px.line(RSI, x=data.index, y=RSI.columns, title='Time Series with Range Slider and Selectors')
  
  fig.update_xaxes(
      rangeslider_visible=True,
      rangeselector=dict(
          buttons=list([
              dict(count=1, label=&quot;1m&quot;, step=&quot;month&quot;, stepmode=&quot;backward&quot;),
              dict(count=6, label=&quot;6m&quot;, step=&quot;month&quot;, stepmode=&quot;backward&quot;),
              dict(count=1, label=&quot;YTD&quot;, step=&quot;year&quot;, stepmode=&quot;todate&quot;),
              dict(count=1, label=&quot;1y&quot;, step=&quot;year&quot;, stepmode=&quot;backward&quot;),
              dict(step=&quot;all&quot;)
          ])
      )
  )
  fig.show()
  
  </code></pre>