yellowtail
V2EX  ›  问与答

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

  •  
  •   yellowtail · Jan 25, 2020 · 1618 views
    This topic created in 2324 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   ·   2760 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:29 · PVG 20:29 · LAX 05:29 · JFK 08:29
    ♥ Do have faith in what you're doing.