mywaiting
V2EX  ›  问与答

深夜求助:将Python Dict转换为Excel

  •  
  •   mywaiting · Oct 17, 2013 · 5955 views
    This topic created in 4684 days ago, the information mentioned may be changed or developed.
    Dict的数据是层次较多的kv对,例如这样:

    Dict = {"a": {"b": {"c":{ "d": "data"}}}}

    Excel中需要用到a、b、c等所有Dict中的值,不知道如何转换较好。

    如题,求简便快捷的方法。目前能想到的就是转CSV,再从CSV转Excel。谢谢!
    1 replies    1970-01-01 08:00:00 +08:00
    fanzeyi
        1
    fanzeyi  
       Oct 17, 2013   ❤️ 1
    csv 应该是最佳方案,如果你想要更多功能的话,看看 http://www.python-excel.org/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4869 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 03:58 · PVG 11:58 · LAX 20:58 · JFK 23:58
    ♥ Do have faith in what you're doing.