I have some csv data like this which doesnt have headers in the columns.
I am trying to follow this tutorial here https://plot.ly/python/plot-data-from-csv/ using the code below
import plotly.plotly as py import plotly.graph_objs as go import plotly.figure_factory as FF import numpy as np import pandas as pd # Import data from csv df = pd.read_csv('/home/alec/Desktop/SWPER-Porthleven.csv') sample_data_table = FF.create_table(df.head()) trace1 = go.Scatter( x=df['0'], y=df['1'], #I dont understand how to reference the Data without headers??? mode='lines', name='logx' # Additional options ) layout = go.Layout(title='Simple Plot from csv data', plot_bgcolor='rgb(230, 230,230)') fig = go.Figure(data=[trace1,], layout=layout) # Plot data py.plot(fig, filename='SWPER')
but I dont understand how to reference the Data without headers???
Could anyone help me?