【发布时间】:2020-06-24 13:03:11
【问题描述】:
我在 python pandas 中运行了如下命令:
q1_fisher_r[(q1_fisher_r['TP53']==1) & q1_fisher_r[(q1_fisher_r['TumorST'].str.contains(':1:'))]]
我收到以下错误:
TypeError: Cannot perform 'rand_' with a dtyped [float64] array and scalar of type [bool]
我尝试使用的解决方案: error link.
相应地将代码更改为:
q1_fisher_r[(q1_fisher_r['TumorST'].str.contains(':1:')) & (q1_fisher_r[(q1_fisher_r['TP53']==1)])]
但我还是遇到了和TypeError: Cannot perform 'rand_' with a dtyped [float64] array and scalar of type [bool]一样的错误
【问题讨论】:
-
您的问题已得到解答here