Worksheet::GetBounds

It is recommended that you switch to the originpro package. PyOrigin is primarily for users who need to work with Origin version prior to 2021.

 

Description

Get the minimum beginning and maximum ending row indices for the specified columns in this Worksheet.

Syntax

GetBounds(C1,  C2, IncludeMissingValues = True)

Parameters

C1
Input begining column index(0 based)
C2
Input ending column index(0 based)
IncludeMissingValues
True (default) advances iR1 to first row with non-missing value and retards iR2 to last row with with non-missing value.
False will not modify iR1 and iR2

Return

The vector contains maximum and minimum value.

Examples

#Create Book1
import PyOrigin
PyOrigin.LT_execute('newbook name:=Book1')
Sheet=PyOrigin.WorksheetPages('Book1').Layers(0)
#Set data
pArr = [[x for x in range(5)] for x in range(2)] 
Sheet.SetData(pArr, 0,0)
#get worksheet bounds
bounds=Sheet.GetBounds(0, 1)
print('the minimum and maximum are:')
for m in bounds:
    print(m)

See Also

Worksheet::SetUpperBound