Commit 94c7cd68 authored by Nic's avatar Nic
Browse files

make gsource OK for python<3.8

parent 4c3422c0
......@@ -416,7 +416,13 @@ class DataFrameSchematizer:
if self._is_units:
# recover target units as specified in the validation schema
_props = schema["properties"]
self._target_units = {k: v for k in _props if (v := _props[k].get("units"))}
# python >= 3.8 only
# self._target_units = {k: v for k in _props if (v := _props[k].get("units"))}
self._target_units = {}
for k in _props:
v = _props[k].get("units")
if v:
self._target_units[k] = v
# split dataframe in two parts: one that will be quantified, the other not
# will be quantified the columns:
# * have a specified unit (source units)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment