0
$\begingroup$

I want to put 2nd column in an array of the following data like [1,1,1,1,..]:

87    1
60    1
19    1
25    1
32    0
0     0
37    1
15    0
8     1
3     0
Name: Class_att, dtype: int64

type(y_test) gives

pandas.core.series.Series

How to do this?

$\endgroup$
1
  • $\begingroup$ Have you tried y_test.values? $\endgroup$
    – Tasos
    Dec 14, 2022 at 12:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.