so, I have two dataframes and I'm attempting the match the column 'numbers' from dataframe 1 to the content of the full dataframe 2, and extract the column header and use that as a label/new column in dataframe 1. Struggling to build a pipeline for this though. I am working in Python.
dataframe 1
| numbers |
|---|
| 100 |
| 101 |
| 102 |
| 103 |
| 200 |
| 201 |
| 202 |
| 203 |
| 300 |
| 301 |
| 302 |
| 303 |
dataframe 2:
| construction | fields | plates |
|---|---|---|
| 100 | 200 | 300 |
| 101 | 201 | 301 |
| 102 | 202 | 302 |
| 103 | 203 | 303 |
output [with new column label matched from dataframe 2]:
| numbers | label |
|---|---|
| 100 | construction |
| 101 | construction |
| 102 | construction |
| 103 | construction |
| 200 | fields |
| 201 | fields |
| 202 | fields |
| 203 | fields |
| 300 | plates |
| 301 | plates |
| 302 | plates |
| 303 | plates |