简体   繁体   English

数组条件必须与自身的形状相同

[英]Array conditional must be same shape as self

I get this error when I attempt to compare to variable names such as: 当我尝试与变量名称进行比较时出现此错误:

compare = Search1.where(Search1UK>Search1DE)
compare
compare.fillna(0)

'Search1UK' and 'Search1DE' are both variable names in which I have assigned a name to identify columns within different data frames. “ Search1UK”和“ Search1DE”都是变量名,在其中我分配了一个名称来标识不同数据框中的列。

Anyone could help on this please? 任何人都可以帮忙吗?

尝试:

compare = Search1.where(Search1['Search1UK']>Search1['Search1DE'])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ValueError:条件数组必须与自身的形状相同 - ValueError: Array conditional must be same shape as self “ValueError:条件数组必须与自身形状相同” - "ValueError: Array conditional must be same shape as self" 替换NaN返回ValueError:条件数组必须与self的形状相同 - Replacing NaN returns ValueError: Array conditional must be same shape as self 相同形状数组的掩码 - Mask for an array in the same shape ValueError:`logits` 和 `labels` 必须具有相同的形状 - ValueError: `logits` and `labels` must have the same shape ValueError:块和形状必须具有相同的长度/尺寸 - ValueError: Chunks and shape must be of the same length/dimension 用Python中相同形状的逻辑数组索引数组 - Indexing an array with a logical array of the same shape in Python ValueError:logits 和标签必须具有相同的形状 ((None, 6, 8, 1) vs (None, 1)) - ValueError: logits and labels must have the same shape ((None, 6, 8, 1) vs (None, 1)) ValueError:logits 和标签必须具有相同的形状 ((32, 1) vs (32, 2)) - ValueError: logits and labels must have the same shape ((32, 1) vs (32, 2)) ValueError:logits 和标签必须具有相同的形状 ((None, 1) vs (None, 2)) - ValueError: logits and labels must have the same shape ((None, 1) vs (None, 2))
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM