Logo

pandas小技巧

今天用pandas处理一个表格的时候,需要提取行数为3的倍数的内容(比较怪),我能想到的就是for循环,但是程序里用过的for太多了,首先想到的就是把for和print放到同一行,但是这个操作跟网易云的“简化”没多大区别,问了codeGee,给出的方案是求行数来实现: Pasted image 20240115145947.png Pasted image 20240115150003.png 还是吃了数学不好的亏…

© 2025 All rights reservedBuilt with Flowershow Cloud

Built with LogoFlowershow Cloud