test.py 554 B

1234567891011121314
  1. import pandas as pd
  2. df1 = pd.DataFrame()
  3. list1 = [1,2,3,4,5]
  4. df2 = pd.DataFrame(list1)
  5. test_df=pd.DataFrame({'name':['张三','李四','王五','张三','李四','王五','张三','六六'],
  6. 'level':[10,3,8,14,2,3,18,2],
  7. 'info':['吵闹','安静','中等','吵闹','安静','安静','吵闹','闲散'],
  8. 'change_times':[1,2,3,1,2,4,9,12]
  9. })
  10. print(df1.append(df2))
  11. temp = df1.append(df2)
  12. df3 = pd.DataFrame([7,8,9,8,8])
  13. print(temp.append(df3))
  14. print(df1.append(test_df))