units ¶
units(*, columns=None, length=None)
Project units for a with block, restored on exit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
columns
|
dict of str to str or None
|
Column name to unit, as in |
None
|
length
|
str
|
Length unit of coordinates, as in |
None
|
Examples:
>>> import boitata as bt
>>> with bt.units(columns={"au": "g/t"}):
... bt.Table({"au": [1.0]}).units
{'au': 'g/t'}
used in