I have a dataframe (results) like this:
| index | results |
|---|---|
| 0 | 1 |
| 1 | -1 |
| 2 | 1 |
I have another dataframe (signals) like this:
| index | signals |
|---|---|
| 0 | 200 |
| 1 | 300 |
| 2 | 250 |
| 3 | 450 |
| 4 | 345 |
| 5 | 534 |
I want to add a column in signals such that the value from results will be copied twice in that column like
| index | signals | results |
|---|---|---|
| 0 | 200 | 1 |
| 1 | 300 | 1 |
| 2 | 250 | -1 |
| 3 | 450 | -1 |
| 4 | 345 | 1 |
| 5 | 534 | 1 |
Note: The 1 from index 0 from results is copied twice in index 0 and 1 of signals and so on. How can i go about doing this?