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

Method slice

pattern/db/__init__.py:1855–1858  ·  view source on GitHub ↗

Returns a new Datasheet starting at row i and column j and spanning n rows and m columns.

(self, i, j, n, m)

Source from the content-addressed store, hash-verified

1853 row[j] = function(item)
1854
1855 def slice(self, i, j, n, m):
1856 """ Returns a new Datasheet starting at row i and column j and spanning n rows and m columns.
1857 """
1858 return Datasheet(rows=[list.__getitem__(self, i)[j:j+m] for i in range(i, i+n)])
1859
1860 def copy(self, rows=ALL, columns=ALL):
1861 """ Returns a new Datasheet from a selective list of row and/or column indices.

Callers 1

test_sliceMethod · 0.95

Calls 2

DatasheetClass · 0.85
__getitem__Method · 0.45

Tested by 1

test_sliceMethod · 0.76