From 158125be782c719ad335663fd9ecc7e3f61c9783 Mon Sep 17 00:00:00 2001 From: amrutha1098 <38883175+amrutha1098@users.noreply.github.com> Date: Wed, 21 Jun 2023 20:55:26 +0530 Subject: [PATCH] #1742 allowing Choropleth key_on to traverse through array --- folium/features.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folium/features.py b/folium/features.py index 5792290dc..711dd920b 100644 --- a/folium/features.py +++ b/folium/features.py @@ -1554,7 +1554,7 @@ def __init__( def get_by_key(obj, key): return ( - obj.get(key, None) + (obj[int(key)] if key.isdigit() else obj.get(key, None)) if len(key.split(".")) <= 1 else get_by_key( obj.get(key.split(".")[0], None), ".".join(key.split(".")[1:])