mywaiting
V2EX  ›  问与答

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

  •  
  •   mywaiting · Oct 17, 2013 · 5959 views
    This topic created in 4686 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   ·   2795 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 07:03 · PVG 15:03 · LAX 00:03 · JFK 03:03
    ♥ Do have faith in what you're doing.