84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
一个文件,每行都有起始ip的十进制整数,结束ip的十进制整数,地区名称三个字段。
因为地区字段可能重复,我想根据地区名称作为去重字段,并保留最小的起始ip,最大的结束ip。
目前是可以通过内存存对象,或者插数据库写sql来解决。
我想知道python是否有直接处理这种情况的库,魔法函数之类的?顺便问下awk是不是更适合处理这种文本?
Find a pandas module, code like thisresult = data.groupby('region field')['start ip'].min()['end ip'].max(), I don't know if it can be implemented, go back You can study it
Find a pandas module, code like this
result = data.groupby('region field')['start ip'].min()['end ip'].max(), I don't know if it can be implemented, go back You can study it