Skip to main content

Access lists of dictionaries with their keys' values

Project description

Pyaccessors: The key to lists

list_of_dicts = [
    {"a": "A1", "b": 1},
    {"a": "A1", "b": 2},
    {"a": "A2", "b": 3},
]

accessor = access(list_of_dict, by="a", group=True)
print(accessor)
# {
#     "A1": [{"a": "A1", "b": 1}, {"a": "A1", "b": 2}],
#     "A2": [{"a": "A2", "b": 3},],
# }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyaccessors-0.0.1.tar.gz (1.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyaccessors-0.0.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

Details for the file pyaccessors-0.0.1.tar.gz.

File metadata

  • Download URL: pyaccessors-0.0.1.tar.gz
  • Upload date:
  • Size: 1.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pyaccessors-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6efdeaa13befdbdaf129970d1266e461ac5809d7c675ac7ad02d97b616fb5bbe
MD5 ff74113a4c47430a1f9fc465e3585742
BLAKE2b-256 b0185896e516f2a360248a35630f3e77a1d1803bcf50c3442f93d64438c3eb3e

See more details on using hashes here.

File details

Details for the file pyaccessors-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyaccessors-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for pyaccessors-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e97f68e3e31088e34cef6c144e2728b2230470aca348b46d7d78cfa5818c5d09
MD5 7f15662d51622156eed60476acb8e298
BLAKE2b-256 d64b9b07844a42c28a309f0ec4de9448810de6f6f2855c5a40b7cbce887264b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page