diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2017-11-10 13:42:51 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2017-11-10 13:42:51 +0100 |
commit | 8d7c1f320544d47e5715dbd544f7bd29baeafef0 (patch) | |
tree | 8bb9f4efe2edd0562d6f1c14130ff4b989bd0990 /src/ee/kicad | |
parent | 22e7064c433fbff2e0d5bea521d5267569547560 (diff) | |
download | ee-python-8d7c1f320544d47e5715dbd544f7bd29baeafef0.tar.gz ee-python-8d7c1f320544d47e5715dbd544f7bd29baeafef0.tar.bz2 ee-python-8d7c1f320544d47e5715dbd544f7bd29baeafef0.tar.xz ee-python-8d7c1f320544d47e5715dbd544f7bd29baeafef0.zip |
o Only include ref_num fields in the DataFrame if the symbol is annotated.
Diffstat (limited to 'src/ee/kicad')
-rw-r--r-- | src/ee/kicad/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ee/kicad/__init__.py b/src/ee/kicad/__init__.py index b51e7db..d949fbe 100644 --- a/src/ee/kicad/__init__.py +++ b/src/ee/kicad/__init__.py @@ -45,10 +45,11 @@ def to_pandas(obj: Any, **kwarg): fields = { "ref": c.ref, "ref_type": c.ref_type, - "ref_num": c.ref_num, "value": c.value, "footprint": c.footprint, } + if c.has_ref_num: + fields["ref_num"] = c.ref_num fields.update({f.name: f.value for f in c.fields if f.is_custom}) return fields |