Skip to content

Support unit conversion within Friendly data #24

@suvayu

Description

@suvayu

There are two kinds of units to deal with: physical units, and economic units. Domain specific physical units can be defined and maintained within friendly data using pint. For economic units, salamanca can be used.

Since units are often added as columns (it's also in the registry), adopting that is acceptable, although it inflates file size. An alternative would be to add the unit to the metadata of all relevant columns, similar to alias. However, that is essentially a "fork" of the frictionless spec, and would add a maintenance burden.

As for behaviour during conversions, when doing it in-memory using the Python API, it is simple, the unit conversion functions can do the conversion while reading a dataset into memory. There is no reason why the API cannot also work on dataframes/data arrays directly. When using the CLI, we can adopt the --export/--inplace modes of operation. The functionality can be a separate module, like tseries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions