Ansible
› Ansible Documentation
fsckzy
V2EX  ›  Ansible

Python 如何将 txt 导入 excel?

  •  
  •   fsckzy · Jan 4, 2018 · 6478 views
    This topic created in 3227 days ago, the information mentioned may be changed or developed.

    文件内容如下:

    7 replies  •  2018-01-04 21:07:40 +08:00
    lhx2008
    lhx2008
    Jan 4, 2018
    1
    如果文件没有内容的话,就直接 open("xx.xls","w")就可以了(误)
    wsbnd9
    wsbnd9
    Jan 4, 2018
    2
    按行读取 t x t 然后 循环写 exec l 很容易的
    kindjeff
    kindjeff
    Jan 4, 2018
    3
    改名叫 csv,点开,另存为
    Magnus1k
    Magnus1k
    Jan 4, 2018
    4
    cljnnn
    cljnnn
    Jan 4, 2018
    5
    pandas 或许可以一战。
    pandas.read_table
    pandas.to_excel
    https://pandas.pydata.org/pandas-docs/stable/io.html
    upczww
    upczww
    Jan 4, 2018
    6
    用 pandas 处理 csv, excel 很方便的
    ethanlu
    ethanlu
    Jan 4, 2018 via Android
    7
    弱弱地问,excel 本身不是就可以导入 txt 咩
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1455 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 18:10 · PVG 02:10 · LAX 10:10 · JFK 13:10
    ♥ Do have faith in what you're doing.