我正在尝试从两个列表中创建两列。
我尝试使用 zip 构建 DataFrame 并插入列表,但较大的列表被切断了。
import pandas as pd
list1 = ['new book revealing', 'library for topic modelling']
list2 = ['potentially embarrassing', 'several international', 'daily newspaper']
df = pd.DataFrame(list(zip(list1, list2)), columns =['list1', 'list2'])
我的输出:
list1 list2
0 new book revealing potentially embarrassing
1 library for topic modelling several international
良好的输出:
list1 list2
0 new book revealing potentially embarrassing
1 library for topic modelling several international
2 daily newspaper
猛跑小猪
慕的地8271018
明月笑刀无情
相关分类