当数据集的列中包含0和负值时,如何在数据集中执行任何转换(如log transformation,boxcox)?

2024-06-09 10:17:24 发布

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

###  box-cox method

from scipy import stats

stats.boxcox(datamart[column])

ValueError: Data must be positive

我无法执行日志转换,因为它包含0个值。我无法删除0值行


Tags: fromimportboxdatastatscolumnscipybe