我有一个名为df
的示例数据集,其中stage time是到达那里的天数:
id stage1_time stage_1_to_2_time stage_2_time stage_2_to_3_time stage3_time
a 10 30 40 30 70
b 30
c 15 30 45
d
我编写了以下脚本,以获得针对CDF的stage1_time
的散点图:
输出:
目前,我有多少天达到了stage1
的人根据其累积概率绘制了图,但是我要实现的是,当我绘制图时,散点有三种颜色:那些达到stage1
并停留在那里的人,那些移到stage2
的人,以及那些移到{stage1
,}instage2
和{
有人能帮忙到那里吗?在
仅供参考,我的目的是使用这个作为基础,以便我也可以为stage2_time
创建一个图形,其中到达{
您可以创建一个新列并使用它来存储最终阶段,然后使用此新列为绘图着色。在
相关问题 更多 >
编程相关推荐