I have a program that sorts through a large series of data and pulls a bunch of necessary values and saves them as numbers or strings.
How do I then place those values into a new dataframe?
For instance:
labels = ['A', 'B', 'C', 'D']
df = pd.DataFrame(columns=labels)
Now I want to add variables x, y, Z and the text "banana" to the DataFrame into A, B, C and D respectively.
Is there a line of code using an append-like method or something similar that will do this quickly and efficiently?
(My actual dataframe will have a multitude of columns, so a quick script is much more useful than creating an empty dataframe and changing each cell value.)