Process data-trees with reconfigurable-paths in Python

Latest Version in PyPI Latest version in Anaconda-cloud (0.5.0, May 14, 2020) Latest release in GitHub Travis build status (Linux) Apveyor build status (Windows) cover-status Documentation Dependencies up-to-date? Downloads Issues count Supported Python version Project License

pandalone is a collection of utilities for working with hierarchical-data using relocatable-paths.

Date:2020-05-14 23:59
PyPI repo:https://pypi.python.org/pypi/pandalone
Keywords:calculation, data, dependencies, engineering, excel, library, numpy, pandas, processing, python, resolution, scientific, simulink, tree, utility
Copyright:2015 European Commission (JRC-IET)
License:EUPL 1.1+

Currently only 2 portions of the envisioned functionality are ready for use:

  • pandalone.xleash: A mini-language for “throwing the rope” around rectangular areas of Excel-sheets.
  • pandalone.mappings: Hierarchical string-like objects that may be used for indexing, facilitating renaming keys and column-names at a later stage.

Our goal is to facilitate the composition of engineering-models from loosely-coupled components. Initially envisioned as an indirection-framework around pandas coupled with a dependency-resolver, every such model should auto-adapt and process only values available, and allow remapping of the paths accessing them, to run on renamed/relocated value-trees without component-code modifications.

It is an open source library written and tested on Python-3.6+ , Windows and Linux.


The project, as of May-2015, is considered at an alpha-stage, without any released version in pypi yet.



The container of data consumed and produced by a :term`model`, which may contain also the model. Its values are accessed using path s. It is implemented by pandalone.pandata.Pandel as a mergeable stack of JSON-schema abiding trees of strings and numbers, formed with:

  • sequences,
  • dictionaries,
  • pandas instances, and
  • URI-references.
That part of the data-tree that relates only to the I/O data processed.
A collection of component s and accompanying mappings.
Encapsulates a data-transformation function, using path to refer to its inputs/outputs within the value-tree.
A /file/like string functioning as the id of data-values in the data-tree. It is composed of step, and it follows the syntax of the JSON-pointer.
The parts between between two conjecutive slashes(/) within a path. The Pstep facilitates their manipulation.

Specifies a transformation of an “origin” path to a “destination” one (also called as “from” and “to” paths). The mapping always transforms the final path-step, and it can either rename or relocate that step, like that:

------          -----------   -----------
/rename/path    foo       --> /rename/foo        ## renaming
/relocate/path  foo/bar   --> /relocate/foo/bar  ## relocation
/root           a/b/c     --> /a/b/c             ## Relocates all /root sub-paths.

The hierarchy is formed by Pmod instances, which are build when parsing the mappings list, above.

The JSON schema is an IETF draft that provides a contract for what JSON-data is required for a given application and how to interact with it. JSON Schema is intended to define validation, documentation, hyperlink navigation, and interaction control of JSON data. You can learn more about it from this excellent guide, and experiment with this on-line validator.
JSON Pointer(RFC 6901) defines a string syntax for identifying a specific value within a JavaScript Object Notation (JSON) document. It aims to serve the same purpose as XPath from the XML world, but it is much simpler.