Returns a function that converts all values in a single time series from the specified unit value to the specified unit.
The unit passed can either be a value from Unit
or a valid Alias
from the list of available units and
conversions below:
Length
Unit | Alias | Names |
---|---|---|
m | meter | Meter |
cm | centimeter | Centimeter |
mm | millimeter | Millimeter |
μm | micron, micrometer | Micrometer |
nm | nanometer | Nanometer |
angstrom | Angstrom | |
km | kilometer | Kilometer |
in | inch | Inch |
ft | foot | Foot |
yd | yard | Yard |
mi | mile | Mile |
Temperature Units
Unit | Alias | Names |
---|---|---|
°C | Celsius | Celsius |
K | kelvin | Kelvin |
°F | Fahrenheit | Fahrenheit |
°R | °Ra, rankine | Rankine |
Pressure Units
Unit | Alias | Names |
---|---|---|
Pa | n/m2, pascal | Pascal |
hPa | hectopascal | Hectopascal |
kPa | kPaa, kilopascal | Kilopascal |
kPag | Kilopascal gauge | |
atm | Atmosphere | |
bar | bara | Bar |
barg | Bar gauge | |
fth2o | Foot of Water Column | |
inh2o | Inches of water | |
inhg | Inch of Mercury | |
Torr | mmhg | Torr (mmhg) |
mTorr | Millitorr | |
psi | psia | Pound-force per square inch |
psig | Pound-force per square inch gauge |
Time Units
Unit | Alias | Names |
---|---|---|
s | second | Second |
ms | millisecond | Millisecond |
μs | microsecond | Microsecond |
ns | nanosecond | Nanosecond |
min | minute | Minute |
hr | hour | Hour |
Mass Units
Unit | Alias | Names |
---|---|---|
kg | kilogram | Kilogram |
g | gram | Gram |
lb | pound | Pound |
Contact your service administrator to access and extend the list of units and conversions for your deployment.
FunctionNode
) -> FunctionNode
Column name | Type | Description |
---|---|---|
timestamp | pandas.Timestamp | Timestamp of the point |
value | float | Value of the point |
This function is only applicable to numeric series.
Copied!1>>> series = F.points( 2... (1, 8.0), 3... (101, 4.0), 4... (200, 2.0), 5... (201, 1.0), 6... (299, 35.0), 7... (300, 16.0), 8... (1000, 64.0), 9... name="series", 10... ) 11>>> series.to_pandas() 12 timestamp value 130 1970-01-01 00:00:00.000000001 8.0 141 1970-01-01 00:00:00.000000101 4.0 152 1970-01-01 00:00:00.000000200 2.0 163 1970-01-01 00:00:00.000000201 1.0 174 1970-01-01 00:00:00.000000299 35.0 185 1970-01-01 00:00:00.000000300 16.0 196 1970-01-01 00:00:00.000001000 64.0
Copied!1>>> unit_converted = F.unit_conversion("m", "mm")(series) 2>>> unit_converted.to_pandas() 3 timestamp value 40 1970-01-01 00:00:00.000000001 8000.0 51 1970-01-01 00:00:00.000000101 4000.0 62 1970-01-01 00:00:00.000000200 2000.0 73 1970-01-01 00:00:00.000000201 1000.0 84 1970-01-01 00:00:00.000000299 35000.0 95 1970-01-01 00:00:00.000000300 16000.0 106 1970-01-01 00:00:00.000001000 64000.0