当我使用以下代码时:
frioMurteira = data.loc[(data["POM"] == "Murteira" & data["TMP"] > 7.2), ["DTM","TMP"]]
我收到以下错误:
cannot compare a dtyped [float64] array with a scalar of type [bool]
你能帮帮我吗?
谢谢
答案 0 :(得分:3)
我认为你的大括号出错了,试试这个:
frioMurteira = data.loc[(data["POM"] == "Murteira") & (data["TMP"] > 7.2), ["DTM","TMP"]]