I am trying to make a new dataframe of 2 columns. First column is id
and second column is predictions
. I want to create a dataframe with first column id
which is taken from testdata
and predictions
is an array of 0's
and 1's
. Column names should be id
and predictions
.
Sample data:
My new create dataframe should be like this:
Expected output:
id predictions
3242 0
3246 1
7655 1
1324 0
4643 1
I tried following code but I am getting some error please check screenshot: