1. pandas.core.series.Series转化成list
df.tolist()
2. list转化成pandas.core.series.Series
pd.Series([1,2,3],'A')
3. pandas.core.series.Series 头部和尾部插入数据
将列表new_data,分别在df后面和前面分别插入
df = pd.Series([2, 3, 4], name='A')
new_data = [5,6,7,8]
df_new = pd.Series(df.tolist() + new_data, name='A')
df_new = pd.Series(new_data + df.tolist(), name='A')
4. DataFrame在尾部添加一行数据
df = pd.DataFrame(columns=["A","B","C"]) # 初始化数据列表
df.loc[len(df)] = [1,2,3] df.loc[len(df)] = [4,5,6]5. 两个DataFrame进行连接
df1 = pd.concat([df1, df2])(注意df1和df2都是DataFame, 不是Series) 标签:tolist,记录,df,Series,pd,使用,new,data,Pandas From: https://www.cnblogs.com/wieneralan/p/17881938.html