Q:

How to check particular ip address belongs to which range in PySpark dataframe?

I have 2 PySpark dataframes. The 2nd dataframe consists of IP address and 1st dataframe has 3 column, 1st column starting IP address and 2 column end ip address and 3rd column has a country name. 
Now I have to check the 2nd dataframe ip address column to the 1st dataframe column to know from which country it belongs??

A:

if you want to check from which country ip belongs then go with python geoip2 framework.
for more info refer :-  https://packagist.org/packages/geoip2/geoip2

