# 生成一些随机数据
for i in range(100):
if np.random.rand() < 0.5:
df.loc[i] = ['工序1', np.random.randint(1, 31)]
else:
df.loc[i] = ['工序2', np.random.randint(1, 31)]
随机(50%概率)分配数据到工序1或工序2
标签:loc,工序,50%,randint,random,随机,np From: https://blog.51cto.com/u_16055028/6393456