相关疑难解决方法(0)

在pd.Dataframe中选择反索引

如何使用loc或在pd.DataFrame中选择反索引iloc

我尝试了df.loc[!my_index,my_feature]但是失败了。

而且df.loc[[ind for ind in df.index.tolist() if ind not in my_index],my_feature]看起来太呆板了。有更好的主意吗?

python indexing dataframe pandas

5
推荐指数
3
解决办法
2825
查看次数

标签 统计

dataframe ×1

indexing ×1

pandas ×1

python ×1