【问题标题】:Double slash problem while writing into excel sheet using pandas python使用pandas python写入excel工作表时出现双斜线问题
【发布时间】:2019-03-07 09:04:24
【问题描述】:

我有这样的数据框: I have got this data frame after some manipulation

当我使用 df.to_excel(Output.xlsx,Sheet1) 写入 excel 工作表时,它会被写入 excel 工作表但带有双斜杠。when i write into excel sheet。 我不想出现双斜线。

【问题讨论】:

  • 复制并粘贴数据框的样本,以便我们可以在代码中重现它

标签: python excel pandas dataframe


【解决方案1】:

试试下面的

df.to_excel(Output.xlsx, sheet_name='Sheet1',encoding='utf-8')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-15
    • 2021-04-16
    • 1970-01-01
    • 1970-01-01
    • 2018-05-13
    • 1970-01-01
    • 2018-08-12
    • 1970-01-01
    相关资源
    最近更新 更多