Jul-07-2022, 04:43 PM
Is "machine_status" a key (column header) in df1?
This is how things work in theory
This is how things work in theory
import pandas as pd df1 = pd.DataFrame({"Letters": ["A", "B", "C", "D"]}) df2 = pd.DataFrame({"Numbers": [1, 2, 3, 4]}) df1["Integers"] = df2["Numbers"] # df1 can be any name. df2 has to be existing column print(df1)
Output: Letters Integers
0 A 1
1 B 2
2 C 3
3 D 4