I'm trying to map array data to a list of column names
cols = list(X.columns)
a = log_reg.coef_
pd.Series(data=a,index=cols)
but keep getting this error message
ValueError: Length of passed values is 1, index implies 32
This is a sample of the data in a
array([[-3.45917636e-04, 3.61924667e-01, -4.09270503e-01,
-8.77365851e-01, 2.63110856e-01, 1.19371203e-01,
-1.24971101e-01, 4.36160913e-01, -3.99315598e-01,
-4.43522845e-01, -4.06608631e-01, -3.75995346e-01,
-7.94023490e-02, -3.19954555e-01, -6.44072018e-01,
-6.89515406e-01, -3.31630739e-01, -4.58094286e-01,
1.17109079e-01, 2.28902301e-02, 1.74657944e-01,
4.70689088e-01, 5.72027148e-01, 2.93303704e-01,
-6.04354969e-03, -6.04084018e-01, 1.22102664e-01,
-3.65628250e-02, 8.46421904e-02, -3.97469438e-03,
1.05515634e+00, -6.57530123e-01]])
and the list of rows in cols:
['Time',
'V1',
'V2',
'V3',
'V4',
'V5',
'V6',
'V7',
'V8',
'V9',
'V10',
'V11',
'V12',
'V13',
'V14',
'V15',
'V16',
'V17',
'V18',
'V19',
'V20',
'V21',
'V22',
'V23',
'V24',
'V25',
'V26',
'V27',
'V28',
'Amount',
'Hours',
'Fraudulent']
The endgoal is to create a series showing the coefficients of each feature (represented by the cols list)