yellowtail
V2EX  ›  问与答

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

  •  
  •   yellowtail · Jan 25, 2020 · 1570 views
    This topic created in 2303 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   ·   2878 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:19 · PVG 18:19 · LAX 03:19 · JFK 06:19
    ♥ Do have faith in what you're doing.