有没有办法使用 IP2Locationdatabase.get_all()
并将结果转换为 Pandas DataFrame?我真的很迷茫,不知道该怎么做。
我得到了一个错误AttributeError: 'IP2LocationRecord' object has no attribute 'values'
。
我得到的值
{'ip': '104.145.231.146', 'country_short': 'US', 'country_long': 'United States of America', 'region': 'New York',
'city': 'Buffalo', 'latitude': 42.886452, 'longitude': -78.878372, 'zipcode': '14201', 'timezone': '-05:00'}
预期结果
ip country_short country_long .... zipcode timezone
0 104.145.231.146 US United States of America 14201 -05:00