V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
yellowtail
V2EX  ›  问与答

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

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