yellowtail
V2EX  ›  问与答

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

  •  
  •   yellowtail · Jan 25, 2020 · 1831 views
    This topic created in 2416 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   ·   Privacy   ·   Solana   ·   1200 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 17:19 · PVG 01:19 · LAX 10:19 · JFK 13:19
    ♥ Do have faith in what you're doing.