我正在尝试在python中选择数据类型
binary = [c for c in data.columns if data[c].nunique() == 2]
numerical = [c for c in data.columns if data.select_dtypes(exclude=['int'])]
categorical = [c for c in data.columns if (c not in numerical) & (c not in binary)]
但是在选择数值变量时出现了贝洛错误
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().