Implementing sklearn.linear_model.SGDClassifier using python I have an excel file that contains details related to determining the quality of a wine and I want to implement the linear model concept using the function sklearn.linear_model.SGDClassifier(SVM => Hinge loss) and (Logarithmic regression =>log loss) using python. I learned the basics about these function through the scikit learn website and I am not able to implement the model using excel file. I am very new to python and machine learning and I finding it hard to implement the model. I opened the excel file in python and tried to take two columns [randomly] from the file and use that as an input to call the fit function available in the model. But, I got an error stating Unknown label type: array. I tried a couple of other methods too, but, nothing worked. Can someone guide me with the implementation process? 

from xlrd import open_workbook
from sklearn import linear_model
i = 0
fa = []
ph = []

book = open_workbook('F:/BIG DATA/winequality.xlsx')
sheet = book.sheet_by_name('Sheet1')
num_rows = sheet.nrows - 1
num_cols = sheet.ncols - 1
curr_row = 0
while curr_row &lt;num_rows:
    curr_row += 1
    cell_val = sheet.cell_value(curr_row,0)
    cell_val1 = sheet.cell_value(curr_row,10)

    fa.append([float(cell_val),float(cell_val1)])
    cell_val2 = sheet.cell_value(curr_row,8)
    ph.append(float(cell_val2))

model = linear_model.SGDClassifier()
print(model.fit(fa,ph))




The error message screenshot:
I think that this is the same issue as in this question.

The shape of $X$ must be (n_samples, n_features) as explained in the
SVC.fit docstring. A 1-d array is interpreted as a single sample (for
convenience when doing predictions on single samples). Reshape your $X$
to (n_samples, 1).

That means you should use numpy.reshape to reshape the $X$ column. If the data frame has n rows, you should use
X_new = X.reshape(n, 1)

Then use the fit method with $X_{new}$. Note: you probably don't need to do this if you use two or more $X$ columns for your model fitting.