当前位置:网站首页>Brief introduction to the usage of iloc in dataframe
Brief introduction to the usage of iloc in dataframe
2022-06-26 01:44:00 【Passion6378】
grammar :df.iloc[: , :]
1, The preceding colon represents the selected row , The following colon represents how many columns are selected
2, The principle of left closing and right opening
Explain by a set of columns
df.iloc[0:1 , :] # Select the first 1 That's ok df.iloc[0, :] # Select the first 1 That's ok df.iloc[1:3 , :] # Select the first 2 Go to the first place 4 That's ok , The first 4 Line unselected df.iloc[: , 1:2] # Select the first 2 Column df.iloc[:, 1] # Select the first 2 Column df.iloc[: , 2:4] # Select the first 3 Column to the first 5 Column , The first 5 Column is not selected df.iloc[1:3 , 2:4] # Select the first 2 Go to the first place 4 That's ok , And No 3 Column to the first 5 Column .3 That's ok ,5 Column is not selected , The principle of left closing and right opening
边栏推荐
- 如何为政企移动办公加上一道“安全锁”?
- cyclegan:unpaired image-to-image translation using cycle-consistent adversarial network
- PTA class a simulated sixth bomb: 1156-1159
- Flex & bison start
- Android system startup security
- Accumulation of some knowledge points in machine learning
- 2022 Anhui province safety officer C certificate examination practice questions simulated examination platform operation
- JSON简介
- Talking about interface test (I)
- 分布式系统(二)分布式事务的理解
猜你喜欢

--SQL of urban cultivation manual -- Chapter 1 basic review

24. histogram calculation

CityJSON

What happens from entering a web address in the browser's input box to seeing the contents of the web page?

Simple making of master seal

21. Hoff circle transformation

The overall process of adding, deleting, modifying and querying function items realized by super detailed SSM framework

Shengxin weekly issue 34

热血男孩滕文泽 受邀担任第六季完美童模全球总决赛形象大使

丨EGFR FISH 探针解决方案
随机推荐
Talking about interface test (2)
App test (I)
CYCA少儿形体礼仪 乐清市培训成果考核圆满落幕
论文阅读 Exploring Temporal Information for Dynamic Network Embedding
25. histogram comparison
缓冲
Oracle常用的基础命令
Oracle数据库开启备份准备工作
GUN make (5) makefile中的变量
recvmsg & sendmsg
26. histogram back projection
丨EGFR FISH 探针解决方案
17.11 std::atomic续谈、std::async深入谈
22. pixel remapping
User unlock status query
Xiaomi tablet 5 Pro unlock bootloader
浅谈接口测试(二)
Android system startup security
Shengxin weekly issue 33
--SQL of urban cultivation manual -- Chapter 1 basic review