我订阅了一个ip2location服务,它为我提供了一个以下格式的SQL表我想解析我的访问日志并对所有用户进行分类,访问日志具有IP地址和用户IP(例如)select city from ip2location where FromIP <= $ipAsInt AND ToIP => $ipAsInt我猜这一定是ip2location的一种非常常见的用法。有没有可能优化结构?
我曾使用IP2Location收集有关IP地址的信息,我想将其放在DataFrame中,但当我尝试使用pd.json_normalize(ip)时,我得到了一个错误。AttributeError: 'IP2LocationRecord' object has no attribute 'values'{'ip':
我正在尝试使用IP2Location库,但目前还没有成功Download IP2Location C library at here.directory.Edit setup.py to point library_dirs and include_dirs ponting to IP2Locationsetup.py build && python setup.py install
这就是我的setup.py的外观:从distut