ufunc 'add' did not contain a loop with signature matching types (dtype('<U4'), dtype('float64')) -> None
时间: 2023-12-14 20:02:29 浏览: 131
基于DataFrame改变列类型的方法
5星 · 资源好评率100%
This error message indicates that there is a problem with the input types of the 'add' ufunc. Specifically, the ufunc is expecting two arrays with types dtype('<U4') (unicode strings with 4 or fewer characters) and dtype('float64') (64-bit floating point numbers), but it could not find a matching loop to perform the operation.
To fix this error, you may need to check the input types of your arrays and ensure that they match the expected types for the 'add' ufunc. Alternatively, you may need to use a different ufunc or perform type conversions on your input arrays before using the 'add' ufunc.
阅读全文