admin管理员组文章数量:1332361
NameError Traceback (most recent call last) Cell In[38], line 16 14 def analyze_preparedness(df, variable): 15 urban_counts = df[[f'Urban_{level}' for level in ['Not_at_all', 'Somewhat', 'Quite_bit', 'Very_much']]].loc[df['Variable'] == variable].values[0] ---> 16 rural_counts = df[[f'Rural_{level}' for level in ['Not_at_all', 'Somewhat', 'Quite_bit', 'Very_much']]].loc[df['Variable'] == variable].values[0] 17 p_value = df['P-value'][df['Variable'] == variable].values[0] 19 urban_total = sum(urban_counts)
NameError: name 'variable' is not defined
本文标签: variablesIs there a python function to make comparisonStack Overflow
版权声明:本文标题:variables - Is there a python function to make comparison? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742312000a2451055.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论