diff options
Diffstat (limited to 'src/ee/digikey')
-rw-r--r-- | src/ee/digikey/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ee/digikey/__init__.py b/src/ee/digikey/__init__.py index d1664e2..3341e28 100644 --- a/src/ee/digikey/__init__.py +++ b/src/ee/digikey/__init__.py @@ -2,6 +2,7 @@ import enum from typing import List, Optional from ee.tools import mk_parents +import ee._utils import re import requests import os @@ -376,6 +377,8 @@ class DigikeyRepository(object): def to_pandas(self): import pandas + columns = [] data = [part._to_pandas_dict() for part in self.products] index = [part.mpn for part in self.products] - return pandas.DataFrame(data=data, index=index) + df = pandas.DataFrame(data=data, index=index) + return ee._utils.ensure_has_columns(df, ["MPN", "Digi-Key", "URL"]) |