I have some data I\'m trying to organize into a DataFrame in Pandas. I was trying to make each row a Series and append it to the Da
DataFrame
Pandas
Series
Da
This would work as well:
df = pd.DataFrame() new_line = pd.Series({'A2M': 4.059, 'A2ML1': 4.28}, name='HCC1419') df = df.append(new_line, ignore_index=False)
The name in the Series will be the index in the dataframe. ignore_index=False is the important flag in this case.
name
ignore_index=False