Sometimes, just sometimes, you really want to get rid of the legend(s) in your Folium Choropleth map. However, there is no method within the Choropleth object to achieve that.
Currently, the most straightforward way of removing the legend from your map is by looping over all the layers in the Choropleth object and removing the ones that can be identified as a legend.
First, let’s create our map and choropleth layer.
import folium m = folium.Map() c = folium.Choropleth( ... )
Let’s take a look at the _children of the Choropleth object stored in c.
c._children
In the ordered dictionary, you can see a GeoJSON and a StepColormap.
![](https://www.roelpeters.be/wp-content/uploads/2021/09/image-2.png)
By removing the StepColormap, you will be able to remove the legend from your choropleth visualization.
for key in c._children: if key.startswith('color_map'): del(c._children[key]) c.add_to(m)
Congratulations, you removed the legend from your choropleth map.
Medikamente in der Apotheke von Rotterdam, Niederlande erhältlich Perrigo Turbaco acheter du médicaments en France