小编Blu*_*and的帖子

Python Pandas ValueError数组必须全部相同

迭代一大堆.mp3链接以获取元数据标签并将其保存到Excel文件中.导致此错误.我感谢任何帮助.谢谢.

    #print is_connected();

    # Create a Pandas dataframe from the data.
df = pd.DataFrame({'Links' : lines ,'Titles' : titles , 'Singers': finalsingers , 'Albums':finalalbums , 'Years' : years})


    # Create a Pandas Excel writer using XlsxWriter as the engine.
writer = pd.ExcelWriter(xlspath, engine='xlsxwriter')

    # Convert the dataframe to an XlsxWriter Excel object.
df.to_excel(writer, sheet_name='Sheet1')
    #df.to_excel(writer, sheet_name='Sheet1')


    # Close the Pandas Excel writer and output the Excel file.
writer.save()

Traceback (most recent call last):
  File "mp.py", line 87, in <module>
    df …
Run Code Online (Sandbox Code Playgroud)

python pandas

11
推荐指数
4
解决办法
4万
查看次数

标签 统计

pandas ×1

python ×1