mishmash.util module¶
-
mishmash.util.mostCommonItem(lst)[source]¶ Choose the most common item from the list, or the first item if all items are unique.
-
mishmash.util.normalizeCountry(country_str, target='iso3c', title_case=False)[source]¶ Return a normalized name/code for country in
country_str. The input can be a code or name, thetargetdetermines output value. 3 character ISO code is the default (iso3c), ‘country_name’, and ‘iso2c’ are common also. Seecountrycode.countrycodefor details and other options. RaisesValueErrorif the country is unrecognized.