ibis 随机抽样

 #随机抽样

tmp=(
    result
    .filter(_.A == '兰州')
    .order_by(ibis.random())  # 随机排序
    .limit(2)  # 取前 2 行
)

#按比例随机抽样
tmp=(
    result
    .sample(0.1)
)

评论

此博客中的热门博文

V2ray websocket(ws)+tls+nginx分流

Rstudio 使用代理