I have to separate data frame with a common column named col_id.
My problem is the simple merge is not the ideal for my case.
Here is an example structure of df1 col_id
col_id stock ch2
1 id_100 stock 2 yes
2 id_100002 stock 2 no
3 id_100003 stock 2 no
And for the second df
col_id num cat1
1 id_100 num 2 0
2 id_100 num 2 1
3 id_100 num 2 0
4 id_100002 num 2 1
5 id_100002 num 2 1
6 id_100002 num 2 1
7 id_100003 num 2 1
8 id_100003 num 2 1
The output i would like to have is to fill all cells of the second df with the same value of df one. Example of the output
col_id num cat1 stock ch2
1 id_100 num 2 0 stock 2 yes
2 id_100 num 2 1 stock 2 yes
3 id_100 num 2 0 stock 2 yes
4 id_100002 num 2 1 stock 2 no
5 id_100002 num 2 1 stock 2 no
6 id_100002 num 2 1 stock 2 no
7 id_100003 num 2 1 stock 2 no
8 id_100003 num 2 1 stock 2 no