yellowtail
V2EX  ›  问与答

如何优雅实现判断一个 dataframe 里一列中连续的相同布尔值数量,然后在另一列中写出连续值。。。

  •  
  •   yellowtail · Jan 25, 2020 · 1667 views
    This topic created in 2344 days ago, the information mentioned may be changed or developed.
    祝新年快乐!

    比如,
    1 T 1

    2 T 2

    3 T 3

    4 F 1

    5 F 2

    6 T 1

    用过 for 循环下加 while 判断,用 iloc,但是会溢出报错。。。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   882 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:35 · PVG 04:35 · LAX 13:35 · JFK 16:35
    ♥ Do have faith in what you're doing.