MCPcopy Index your code
hub / github.com/python-visualization/folium / _set_default_key

Method _set_default_key

folium/features.py:935–939  ·  view source on GitHub ↗

Replace the field with the most features with a 'default' field.

(mapping: TypeStyleMapping)

Source from the content-addressed store, hash-verified

933
934 @staticmethod
935 def _set_default_key(mapping: TypeStyleMapping) -> None:
936 """Replace the field with the most features with a 'default' field."""
937 key_longest = max(mapping, key=mapping.get) # type: ignore
938 mapping["default"] = key_longest
939 del mapping[key_longest]
940
941
942class TopoJson(JSCSSMixin, Layer):

Callers 1

_create_mappingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected