get_quantity

function of dascore.units source

get_quantity(
    value: None ,
)-> ‘Quantity | None’

Convert a value to a pint quantity.

Parameters

Parameter Description
value The value to convert to a quantity.

Examples

import dascore as dc
meters = dc.get_quantity("m")
accel = dc.get_quantity("m/s^2")
# This can also convert date times.
many_seconds = dc.get_quantity(dc.to_timedelta64(200))