我们在使用Pandas时候,前提需要一个新的DataFrame,需要首先初始化一个:

  那么可以根据字典形式初始化:

1     # 新建一个dataFrame
2     df = pd.DataFrame({'poetry_content': ''}, index=['0'])

  必须包含index,不然会报错

相关文章:

  • 2022-12-23
  • 2022-01-31
  • 2021-09-13
  • 2021-04-16
  • 2022-01-22
  • 2021-04-08
  • 2021-11-27
  • 2022-01-20
猜你喜欢
  • 2021-05-04
  • 2021-12-10
  • 2022-12-23
  • 2021-06-14
  • 2021-04-06
  • 2021-06-24
相关资源
相似解决方案