$30 off During Our Annual Pro Sale. View Details »

Restructuring Data in Python

Restructuring Data in Python

Lightning talk delivered at PyCon 2018, offers a quick introduction to the Python library glom. Video here: https://www.youtube.com/watch?v=3aREXkfeWek

Mahmoud Hashemi

May 11, 2018
Tweet

More Decks by Mahmoud Hashemi

Other Decks in Technology

Transcript

  1. Restructuring Data
    in Python
    Mahmoud Hashemi - PyCon 2018

    View Slide


  2. Flat is better than nested.
    — Tim Peters
    PEP20
    (The Zen of Python)
    2

    View Slide

  3. “ Namespaces are one
    honking great idea—let’s
    do more of those!
    — Also Tim Peters
    PEP20
    (The Zen of Python)
    3

    View Slide

  4. 4
    ...

    View Slide

  5. glom!
    Python’s nested data operator
    http:/
    /github.com/mahmoud/glom
    5

    View Slide

  6. Path-based declarative access
    6

    View Slide

  7. Readable, meaningful error messages
    7

    View Slide

  8. Declarative data transformation
    8

    View Slide

  9. Features:
    ● Path-based access
    ● Declarative data transformation
    ● Readable, meaningful error messages
    ● Built-in data exploration and debugging
    ● Command-line tool
    ○ Like jq, but you no DSL, just Python
    9

    View Slide

  10. 10
    Thanks!
    pip install glom
    sedimental.org
    @mhashemi
    Open Session Tomorrow 5/12 at 4pm

    View Slide