Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,鉴于此数据框,是否可以使用 df.loc 获取与某些条件相关的数字值?这是我到目前为止想出的。
if df.loc[(df["Tags"]=="Brunei") & (df["Type"]=="Host"),"Number"]:
我希望输出为 1。这是正确的方法吗?