MCPcopy Index your code
hub / github.com/clips/pattern / __init__

Method __init__

pattern/db/__init__.py:1651–1661  ·  view source on GitHub ↗

A matrix of rows and columns, where each row and column can be retrieved as a list. Values can be any kind of Python object.

(self, rows=[], fields=None, **kwargs)

Source from the content-addressed store, hash-verified

1649class Datasheet(CSV):
1650
1651 def __init__(self, rows=[], fields=None, **kwargs):
1652 """ A matrix of rows and columns, where each row and column can be retrieved as a list.
1653 Values can be any kind of Python object.
1654 """
1655 # NumPy array, convert to list of int/float/str/bool.
1656 if rows.__class__.__name__ == "ndarray":
1657 rows = rows.tolist()
1658 self.__dict__["_rows"] = DatasheetRows(self)
1659 self.__dict__["_columns"] = DatasheetColumns(self)
1660 self.__dict__["_m"] = 0 # Number of columns per row, see Datasheet.insert().
1661 CSV.__init__(self, rows, fields, **kwargs)
1662
1663 def _get_rows(self):
1664 return self._rows

Callers

nothing calls this directly

Calls 3

DatasheetRowsClass · 0.85
DatasheetColumnsClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected