Error: UserWarning: Ignoring URL... 已解決

數據data裏存有url,用pandas的to_excel() 報錯:UserWarning: Ignoring URL...url

解決方案:spa

excel

data.to_excel("data.xlsx")

改成:code

writer = pd.ExcelWriter('data.xlsx',
                        engine='xlsxwriter',
                        options={'strings_to_urls': False})

data.to_excel(writer, sheet_name='Sheet1')
writer.save()
相關文章
相關標籤/搜索