使用Dataframe遇到的一些问题

‘ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().’

Dataframe切片过程中,若需满足多个逻辑条件,要使用& 和|,在某些条件下用and/ or会报错,参考链接

x_1 = x_data[x_data['s_line'] > 6 & x_data['p_wid'] > 0]
原文地址:https://www.cnblogs.com/z-712/p/14888646.html