pandas 1.4.2

ParametersReturns
get_locales(prefix: 'str | None' = None, normalize: 'bool' = True, locale_getter: 'Callable[[], bytes]' = <function _default_locale_getter at 0x0000000>) -> 'list[str] | None'

Parameters

prefix : str

If not None then return only those locales with the prefix provided. For example to get all English language locales (those that start with "en" ), pass prefix="en" .

normalize : bool

Call locale.normalize on the resulting list of available locales. If True , only locales that can be set without throwing an Exception are returned.

locale_getter : callable

The function to use to retrieve the current locales. This should return a string with each locale separated by a newline character.

Returns

locales : list of strings

A list of locale strings that can be set with locale.setlocale() . For example:

locale.setlocale(locale.LC_ALL, locale_string)
On error will return None (no locale available, e.g. Windows)

Get all the locales that are available on the system.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/_config/localization.py#113
type: <class 'function'>
Commit: