title: AttributeError: module 'plotly' has no attribute 'plot'
body: <p>I was not expecting this error ("AttributeError: module 'plotly' has no attribute 'plot'") and have not been able to find the exact error. I am thinking its not the exact error because plotly obviously has plotting abilities and that somewhere along the way my data isnt formatted correctly, for this particular exercise.</p>
  
  <p>I am open to suggestions on new methods. This is just what I used because it was easy to follow, its what I want in the end, and its centralized.</p>
  
  <p>Error occurs on last line <code>py.plot( fig, filename='d3-cloropleth-map' )</code></p>
  
  <p>I have copied the code from the example: <a href="https://plot.ly/python/choropleth-maps/" rel="noreferrer">United States Choropleth Map</a></p>
  
  <p>And here is my code:</p>
  
  <pre><code>import plotly as py
  import pandas as pd
  import numpy as np
  
  py.tools.set_credentials_file(username='user', api_key='xxxXxxXxxx')
  
  df = pd.DataFrame.from_csv("C:/Users/d/Documents/Personal/Python Scripts/Python/Connect.csv")
  
  for col in df.columns:
      df[col] = df[col].astype(str)
  df[['Open Balance','Amount', 'Aging']] = df[['Open Balance','Amount', 
      'Aging']].apply(pd.to_numeric, errors='ignore')
  df[['Date', 'Due Date']] = df[['Date','Due Date']].apply(pd.to_datetime)
  
  state_total_byitem = df.groupby(by = ['State', 'Item']).agg({'Open Balance':'sum','Amount':'sum','Paid':'count','Aging':'mean'})
  sti = state_total_byitem
  sti.reset_index(level=['State', 'Item'], inplace=True)
  
  for col in sti.columns:
      sti[col] = sti[col].astype(str)
  
  sti['text'] = 'State ' + sti['State'] + ' Item ' + sti['Item'] + '&lt;br&gt;' +\
      ' Open Balance ' + sti['Open Balance'] + ' Paid ' + sti['Paid'] + '&lt;br&gt;' +\
      ' Amount ' + sti['Amount'] + ' Aging ' + sti['Aging']
  
  scl = [[0.0, 'rgb(220,224,225)'],[0.2, 'rgb(204,220,224)'],[0.4, 'rgb(158,192,200)'],\
              [0.6, 'rgb(100,166,184)'],[0.8, 'rgb(60,175,206)'],[1.0, 'rgb(10,206,255)']]
  
  data = [ dict(
          type='choropleth',
          colorscale = scl,
          autocolorscale = False,
          locations = sti['State'],
          z = sti['Amount'].astype(float),
          locationmode = 'USA-states',
          text = sti['text'],
          marker = dict(
              line = dict (
                  color = 'rgb(255,255,255)',
                  width = 2
              ) ),
          colorbar = dict(
              title = "$ in USD")
          ) ]
  
  layout = dict(
          title = 'Invoices by State&lt;br&gt;(Hover for breakdown)',
          geo = dict(
              scope='usa',
              projection=dict( type='albers usa' ),
              showlakes = True,
              lakecolor = 'rgb(255, 255, 255)'),
               )
  
  fig = dict( data=data, layout=layout )
  py.plot( fig, filename='d3-cloropleth-map' )
  </code></pre>