Add the list down to create a DataFrame
Add any list ** randam_list ** below.
df_randam = pd.Series(randam_list,index=df.columns)
df = df.append(df_randam,ignore_index=True)
Please note that if the number of elements in randam_list does not match the number of indexes in df, an error will occur. Also, an error occurred without ignore_index = True at the time of df.append (), so if you are addicted to it, please add it.
Recommended Posts