I have a DataFrame (df1
) looking like this:
0
Height 175
Weight 80
Now I want to add a row Age
with the value 37
but not at the end (for this we have already a solution) but on Top of my DataFrame.
What I have yet tries is:
pd.DataFrame(np.insert(df1.values, 0, values=['n',5], axis=0))
but I can onyl get this to work without the 'n' string and then there is only one column left.
Anyone a better idea that solves my problem?