我们在使用Pandas时候,前提需要一个新的DataFrame,需要首先初始化一个:
那么可以根据字典形式初始化:
1 # 新建一个dataFrame 2 df = pd.DataFrame({'poetry_content': ''}, index=['0'])
必须包含index,不然会报错