19  Countries

%matplotlib inline

import geopandas
source_url = ("https://www.naturalearthdata.com/"\
              "http//www.naturalearthdata.com/download/"\
              "10m/cultural/ne_10m_admin_0_countries.zip"
             )
source_url
ctys = geopandas.read_file(source_url)
ctys.plot()
areas = ctys.to_crs(epsg=3857).area
areas.plot.hist(bins=100)
smallest = areas.max() / 4000
small = areas.loc[areas<smallest].index
large = ctys.loc[ctys.index.difference(small), :]
large.plot()
ys = large.centroid.geometry.y
large = large.loc[ys > ys.min(), :]

%time large = large.to_crs(epsg=3857)
large.plot()
large.info()
tokeep = [
    "ADMIN",
    "geometry"
         ]
large[tokeep].to_file('countries_clean.gpkg', 
                      driver="GPKG"
                     )