当前位置:网站首页>Dataframe returns the whole row according to the value
Dataframe returns the whole row according to the value
2022-07-03 15:08:00 【2pi】
import pandas as pd
df = pd.DataFrame(
{
" full name ":[" Xiao Zhang "," Xiao Wang "," petty thief "," Xiao zhao "],
" Gender ":[" male "," Woman "," male "," Woman "],
" Age ":[18,19,20,21]
}
)
print(df)
lookup ” Minimum age ” Place of action
Method 1
utilize argmin Return row index , recycling loc Function lookup
import pandas as pd
df = pd.DataFrame(
{
" full name ":[" Xiao Zhang "," Xiao Wang "," petty thief "," Xiao zhao "],
" Gender ":[" male "," Woman "," male "," Woman "],
" Age ":[18,19,20,21]
}
)
print(df.loc[df[" Age "].argmin()])give the result as follows

Method 2
print(df.loc[df[" Age "] == df[" Age "].min()])边栏推荐
- Yolov5 advanced nine target tracking example 1
- 使用Tengine解决负载均衡的Session问题
- There are links in the linked list. Can you walk three steps faster or slower
- mysql innodb 存储引擎的特性—行锁剖析
- [graphics] real shading in Unreal Engine 4
- Yolov5进阶之七目标追踪最新环境搭建(二)
- [transform] [NLP] first proposed transformer. The 2017 paper "attention is all you need" by Google brain team
- Puppet自动化运维排错案例
- Relationship between truncated random distribution and original distribution
- Tensor ellipsis (three points) slice
猜你喜欢

What is machine reading comprehension? What are the applications? Finally someone made it clear

什么是one-hot encoding?Pytorch中,将label变成one hot编码的两种方式

4-20-4-23 concurrent server, TCP state transition;

el-switch 赋值后状态不变化

运维体系的构建
![[transform] [practice] use pytoch's torch nn. Multiheadattention to realize self attention](/img/94/a9c7010fe9f14454469609ac4dd871.png)
[transform] [practice] use pytoch's torch nn. Multiheadattention to realize self attention
![[transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018](/img/2b/b23aeab584f89be6678c0fe059d4b6.png)
[transformer] Introduction - the original author of Harvard NLP presented the annotated transformer in the form of line by line implementation in early 2018
![[ue4] geometry drawing pipeline](/img/30/9fcf83a665043fe57389d44c2e16a8.jpg)
[ue4] geometry drawing pipeline

The picture quality has been improved! LR enhancement details_ Lightroom turns on AI photo detail enhancement: picture clarity increases by 30%

Composite type (custom type)
随机推荐
使用Tengine解决负载均衡的Session问题
基础SQL教程
Unity hierarchical bounding box AABB tree
Use of Tex editor
Global and Chinese markets for sterile packaging 2022-2028: Research Report on technology, participants, trends, market size and share
Puppet自动化运维排错案例
el-switch 赋值后状态不变化
[graphics] hair simulation in tressfx
基于SVN分支开发模式流程浅析
Global and Chinese market of iron free motors 2022-2028: Research Report on technology, participants, trends, market size and share
Centos7 deployment sentry redis (with architecture diagram, clear and easy to understand)
Yolov5进阶之九 目标追踪实例1
第04章_逻辑架构
[attention mechanism] [first vit] Detr, end to end object detection with transformers the main components of the network are CNN and transformer
What is machine reading comprehension? What are the applications? Finally someone made it clear
Global and Chinese market of marketing automation 2022-2028: Research Report on technology, participants, trends, market size and share
[Yu Yue education] scientific computing and MATLAB language reference materials of Central South University
[engine development] in depth GPU and rendering optimization (basic)
解决pushgateway数据多次推送会覆盖的问题
【pytorch学习笔记】Datasets and Dataloaders