Pandas plot without specifying index
<p>Given the data:</p>

<pre><code>Column1; Column2; Column3
1; 4; 6
2; 2; 6
3; 3; 8
4; 1; 1
5; 4; 2
</code></pre>

<p>I can plot it via:</p>

<pre><code>import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('test0.csv',delimiter='; ', engine='python')
titles = list(df)
for title in titles:
    if title == titles[0]:
        continue
    df.plot(titles[0],title, linestyle='--', marker='o')
    plt.savefig(title+'.png')
</code></pre>

<p>But if, instead, data was missing <code>Column1</code> like:</p>

<pre><code>Column2; Column3
4; 6
2; 6
3; 8
1; 1
4; 2
</code></pre>

<p>How do I plot it?</p>

<p>May be, something like <code>df.plot(title, linestyle='--', marker='o')</code>?</p>

<p>I am not sure what you are trying to achieve but you could reset index and set it as you would like:</p>

<pre><code>In[11]: df
Out[11]: 
   Column1   Column2   Column3
0        1         4         6
1        2         2         6
2        3         3         8
3        4         1         1
4        5         4         2
</code></pre>

<p>so if you want to plot col 2 as X axis and 3 as Y axis you could do something like:</p>

<pre><code>df.set_index('Column2')['Column3'].plot()
</code></pre>

python python-2.7 pandas matplotlib dataframe