So I have lot of data currently in excel spreadsheets. I need to graph this through python. I know how to read data from an excel file using xlrd and I know how to graph in python using matplotlib. Basically my data looks has columns of x coordinates, y coordinates, and positive and negative y errors. I need a way for for that data to be imported from the spreadsheet and become points and error bars on a graph. To be honest I'm very new at python and have no idea why my code isn't working.
import xlrd
import numpy as np
import matplotlib.pyplot as plt
file_location = "C:/Users/Rima/Desktop/apjl731data.xlsx"
workbook = xlrd.open_workbook(file_location)
first_sheet = workbook.sheet_by_index(0)
for col in range(first_sheet.ncols):
x = first_sheet.cell_value(0,col)
y = first_sheet.cell_value(1,col)
yerr = first_sheet.cell_value(2,col)
plt.errorbar(x,y,yerr,fmt='r^')
plt.show()
I haven't found how to do this online, only how to make the graphs in excel using python. I'm sure my code is probably missing a lot to make if work but I'm not really sure what. Also for the yerr, in order to get a different error value on the top and bottom of a data point I've been passing it as an array like yerr = np.array([]) with different values for the errors for each point. I have no idea how to import the data since my positive errors and negative errors are in different columns on the spreadsheet. If anyone know how to import the data please help since it would make my life easier since I wouldn't have to hand type 50 data point. Thank you!
Edit: An example of my data would be
log(O/H)+12 positive error negative error virgo infall distance
8.56 0.05 0.05 4.61
8.59 0.03 0.03 -
8.54 0.04 0.06 2.97297
8.94 0.13 0.12 8.24493
I do have gaps in my data which is mark with a -, I don't know if that would cause an error when trying to plot. So I probably need a way to skip those lines. Thanks again.
Edit 2:
I am still having an error so here is the traceback. 
Thanks!
