Leaving first row and last row element in python
<p>I have an CSV file , That i am using for plotting graph.
i wanna remove first row and last column from csv file because first row contain naming and last row contain empty spaces.
The program has worked properly once i remove the first and last rows.How can remove the row in this extracted file. what are correction i need to make to run automatically</p>

<pre><code>import csv
import matplotlib.pyplot as plt

plt.figure()

file =open("graph.csv","r+")
reader = csv.reader(file)
TS=[]
TIME=[]
ACT_ANGLE=[]
DES_ANGLE=[]
for line in reader:

       TS.append(line[12])
       TIME.append(line[5])
       ACT_ANGLE.append(line[7])
       DES_ANGLE.append(line[6])

x=TS
z=ACT_ANGLE
#print x
y=DES_ANGLE


plt.plot(x,y)
plt.xlabel('Time in Sec')
plt.ylabel('Actual angle in degree')
plt.show()
plt.savefig("example.png")
</code></pre>
