I have a initial dataframe D
. I extract two data frames from it like this:
A = D[D.label == k]
B = D[D.label != k]
I want to combine A
and B
into one DataFrame. The order of the data is not important. However, when we sample A
and B
from D
, they retain their indexes from D
.