如何解决数据帧中a必须大于0的问题?

2024-03-29 07:39:45 发布

您现在位置:Python中文网/ 问答频道 /正文

我的代码是:

df.query('level == {0}'.format(i)).sample(nsamples).image.apply( lambda v: (os.path.join(datadir, v) + '.jpeg', i)).values.tolist()

我遇到的错误:

ValueError: 'a' must be greater than 0 unless no samples are taken


Tags: samplepathlambda代码imageformatdfos