aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-11-10 13:42:51 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2017-11-10 13:42:51 +0100
commit8d7c1f320544d47e5715dbd544f7bd29baeafef0 (patch)
tree8bb9f4efe2edd0562d6f1c14130ff4b989bd0990
parent22e7064c433fbff2e0d5bea521d5267569547560 (diff)
downloadee-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.
-rw-r--r--src/ee/kicad/__init__.py3
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