1. 首页
  2. 数据库
  3. 其它
  4. pandas全表查询定位某个值所在行列的方法

pandas全表查询定位某个值所在行列的方法

上传者: 2020-12-31 15:31:07上传 PDF文件 28.59KB 热度 11次
如下所示: # create a dataframe with an integer feature and a categorical string feature demo_df = pd.DataFrame({'Integer Feature': [0, 1, 2, 1], 'Categorical Feature': ['socks', 'fox', 'socks', 'box']}) demo_df 接下来用for遍历: for indexs in demo_df.index: for i in range(len(demo_df.loc[indexs].values)):
下载地址
用户评论