pandas 插入一行数据
# 需要借助 numpy操作
import numpy as np
import pandas as pd
value = {"a":[1,2,3], "b":[1,2,3], "c":[1,2,3]}
df = pd.DataFrame(value)
df1 = pd.DataFrame(np.insert(df.values, 0, values=[0,0,0], axis=0))
df1.columns = df.columns
标签:插入,Python,dataframe,df,value,pd,pandas
From: https://www.cnblogs.com/jessecheng/p/17449847.html