V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
movq
V2EX  ›  程序员

Python 一行一行地添加数据,分析数据的时候需要按列分析,这种怎么实现呢

  •  
  •   movq · Apr 3, 2022 · 1709 views
    This topic created in 1485 days ago, the information mentioned may be changed or developed.

    就比如 data = [] 然后后面不停地 data.append([day,month,year])

    分析的时候,需要单独分析 day 列,month 列,怎么把一列从 data 里面取出来?

    2 replies    2022-04-03 10:23:27 +08:00
    movq
        1
    movq  
    OP
       Apr 3, 2022
    解决了,用 pandas 的 DataFrame
    SenLief
        2
    SenLief  
       Apr 3, 2022
    数据分析你需要 pandas 大杀器。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5650 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 08:22 · PVG 16:22 · LAX 01:22 · JFK 04:22
    ♥ Do have faith in what you're doing.