geoip
-
[Python] Pandas iis-log DataFrame 접속자IP 국가식별 컬럼 추가Python/Python For Analytics 2020. 2. 28. 19:26
import geoip2.database import pandas as pd reader = geoip2.database.Reader('GeoLite2-City.mmdb') log_field = ['date', 'time', 's-sitename', 's-computername' , 's-ip' , 'cs-method' , 'cs-uri-stem', 'cs-uri-query', 's-port' ,'cs-username', 'c-ip', 'cs-version', 'cs-User-Agent', 'cs-Cookie', 'cs-Referer', 'cs-host', 'sc-status', 'sc-substatus', 'sc-win32-status', 'sc-bytes', 'cs-bytes', 'time-taken..