xl_dict
XlDict
Bases: object
wrapper class for xlrd-like API that exposes a simple pandas-like interface to access tabular spreadsheet data with iterrows.
__init__(sheet, nulls=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sheet |
an xlrd.sheet.Sheet |
required | |
nulls |
What value to assign to empty entries. Default is to set them to None. Pass in the desired literal |
None
|
iterrows()
Using the first row as a list of headers, yields a dict for each subsequent row using the header names as keys. returning index, row for pandas compatibility
Returns:
Type | Description |
---|---|
|
unique_units(internal=False)
unitname = 'unit' if self.internal else 'unitName'
units = set(_elementary[unitname].unique().tolist()).union( set(_intermediate[unitname].unique().tolist())) for u in units: self._create_quantity(u)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
internal |
|
False
|
Returns:
Type | Description |
---|---|
|