I am trying to stack two columns in one column, but I want to keep a boolean field that denotes where the new values coming from. Using pivot and melt did not yield much success. Any help would be useful. Here is a small example
param | accuracy | accuracy_with_reg
----------------------------
4 | 0.813 | 0.934
5 | 0.456 | 0.654
6 | 0.342 | 0.564
to the following
param | accuracy | regularized
----------------------------
4 | 0.813 | False
5 | 0.456 | False
6 | 0.342 | False
4 | 0.934 | True
5 | 0.654 | True
6 | 0.654 | True
Thanks