bigframes.geopandas.GeoSeries.to_dict#

GeoSeries.to_dict(into: type[dict] = <class 'dict'>, *, allow_large_results: bool | None = None) Mapping#

Convert Series to {label -> value} dict or dict-like object.

Examples:

>>> from collections import OrderedDict, defaultdict
>>> s = bpd.Series([1, 2, 3, 4])
>>> s.to_dict()
{np.int64(0): 1, np.int64(1): 2, np.int64(2): 3, np.int64(3): 4}
>>> s.to_dict(into=OrderedDict)
OrderedDict({np.int64(0): 1, np.int64(1): 2, np.int64(2): 3, np.int64(3): 4})
>>> dd = defaultdict(list)
>>> s.to_dict(into=dd)
defaultdict(<class 'list'>, {np.int64(0): 1, np.int64(1): 2, np.int64(2): 3, np.int64(3): 4})
Parameters:
  • into (class, default dict) – The collections.abc.Mapping subclass to use as the return object. Can be the actual class or an empty instance of the mapping type you want. If you want a collections.defaultdict, you must pass it initialized.

  • allow_large_results (bool, default None) – If not None, overrides the global setting to allow or disallow large query results over the default size limit of 10 GB.

Returns:

Key-value representation of Series.

Return type:

collections.abc.Mapping