padas1 [Python] Append Row to pandas DataFrame # Append Row to DataFrame list_row = ["Hyperion", 27000, "60days", 2000] df.loc[len(df)] = list_row # Insert Dict to the dataframe using DataFrame.append() new_row = {'Courses':'Hyperion', 'Fee':24000, 'Duration':'55days', 'Discount':1800} df2 = df.append(new_row, ignore_index=True) # Append new row to specifig index name df2 = df.append(pd.DataFrame([new_row],index=['7'],columns=df.columns)) # .. 2022. 12. 12. 이전 1 다음 반응형