Back to Browse

Python for Machine Learning | Pygeoip | Decode ipaddress using pygeoip - P89

1.4K views
Oct 7, 2018
10:47

Python for Machine Learning | Pygeoip | Decode ipaddress using pygeoip - P89 Github Link - https://github.com/technologycult/PythonForMachineLearning/tree/master/Part89 Python for Machine Learning - P89 Topic to be covered - Unveil the ipaddress to get the treasure of Information Code Starts Here ============== import pandas as pd import pygeoip gi = pygeoip.GeoIP('GeoIP.dat') gi.country_code_by_addr('64.233.161.99') gi.country_name_by_addr('64.233.161.99') gp = pygeoip.GeoIP('GeoLiteCity.dat') gp.record_by_addr('100.10.100.1') df = pd.read_csv('ipaddress1.csv') ip1 = [] for x in range(len(df)): z = gp.record_by_addr(df.iloc[x][0]) ip1.append(z) df1=pd.DataFrame(ip1, columns=['area_code','city','continent','country_code','country_code3', 'country_name','dma_code','latitude','longitude','metro_code', 'postal_code','region_code','time_zone']) ip2 = [] for i in range(len(ip1)): if ip1[i] is not None: ip2.append(ip1[i]) print(ip1[i]) df2=pd.DataFrame(ip2, columns=['area_code','city','continent','country_code','country_code3', 'country_name','dma_code','latitude','longitude','metro_code', 'postal_code','region_code','time_zone']) All the playlist of this youtube channel ===================================== 1. Data Preprocessing in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPuOjFcbnXLFvSQaHFK3ymUW 2. Confusion Matrix in Machine Learning, ML, AI https://www.youtube.com/playlist?list=PLE-8p-CwnFPvXzvsEcgb0IZtNsw_0vUzr 3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz https://www.youtube.com/playlist?list=PLE-8p-CwnFPsBCsWwz_BvbZZHIVQ6wSZK 4. Cross Validation, Sampling, train test split in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPsHtol5WXHhq_B3kQPggHH2 5. Drop and Delete Operations in Python Pandas https://www.youtube.com/playlist?list=PLE-8p-CwnFPtvqVVK7QVFsMvDvp2YgCnR 6. Matrices and Vectors with python https://www.youtube.com/playlist?list=PLE-8p-CwnFPsndwnZnL7nXW5mIrdRmgdg 7. Detect Outliers in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPvyCX35yES5D9W7vThiUzwk 8. TimeSeries preprocessing in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPv10bru3719xzDNIgbO6hXA 9. Handling Missing Values in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPvOec0LZ40Bt8OQcbLFa236 10. Dummy Encoding Encoding in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPvu7YriqMZsL9UDbqUUk90x 11. Data Visualisation with Python, Seaborn, Matplotlib https://www.youtube.com/playlist?list=PLE-8p-CwnFPuYBYsmbfMjROOCzKjCwyMH 12. Feature Scaling in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPtwpVV3FwzwYZYR5hT3i52G 13. Python 3 basics for Beginner https://www.youtube.com/playlist?list=PLE-8p-CwnFPu-jseUMtc4i47jQZN4PNbf 14. Statistics with Python https://www.youtube.com/playlist?list=PLE-8p-CwnFPta0COlxS6E5u14m5ouzbRU 15. Data Preprocessing in Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPuOjFcbnXLFvSQaHFK3ymUW 16. Sklearn Scikit Learn Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPtAGb29r8F7up9ilZUXt3l1 17. Linear Regression, Supervised Machine Learning https://www.youtube.com/playlist?list=PLE-8p-CwnFPslDi6sfFbFK4KXcVlLwaOM 18 Interiew Questions on Machine Learning, Artificial Intelligence, Python Pandas and Python Basics https://www.youtube.com/playlist?list=PLE-8p-CwnFPt7VBhcnh82y0autSzuOrZp 19. Jupyter Notebook Operations https://www.youtube.com/playlist?list=PLE-8p-CwnFPtqkFd67OZcoSv4BAI7ez5_

Download

1 formats

Video Formats

360pmp416.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Python for Machine Learning | Pygeoip | Decode ipaddress using pygeoip - P89 | NatokHD