“系列”对象没有属性“ clip_upper”,即使代码中包含clip_upper

问题描述

这是代码

sample_info['cluster'] = phi_hat
de_results = NaiveDE.lr_tests(sample_info,res.T,'~ C(cluster)')

这是错误

AttributeError                            Traceback (most recent call last)
<ipython-input-39-fd12e5d8fddc> in <module>
----> 1 de_results = NaiveDE.lr_tests(sample_info,'~ C(cluster)')

~/opt/anaconda3/lib/python3.7/site-packages/NaiveDE/base.py in lr_tests(sample_info,expression_matrix,alt_model,null_model,rcond)
     33 
     34     results['pval'] = pval
---> 35     results['qval'] = (results['pval'] * n).clip_upper(1.)
     36 
     37     return results

~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py in __getattr__(self,name)
   5272             if self._info_axis._can_hold_identifiers_and_holds_name(name):
   5273                 return self[name]
-> 5274             return object.__getattribute__(self,name)
   5275 
   5276     def __setattr__(self,name: str,value) -> None:

AttributeError: 'Series' object has no attribute 'clip_upper'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)