10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 18:06:06 +02:00

Add optionals arguments to getSubtableIndex

This commit is contained in:
Mickaël Véril 2020-03-21 16:31:50 +01:00
parent 3402445caa
commit 7fb707ec85

View File

@ -73,11 +73,10 @@ class dataFileBase(object):
@staticmethod
def readFromTable(table,format=Format.LINE,default=dataType.ABS ,firstState=state(1,1,"A_1"),commands=[]):
def getSubtableIndex(table):
def getSubtableIndex(table,firstindex=2,column=0,count=1):
subtablesindex=list()
firstindex=2
for i in range(3,np.size(table,0)):
if str(table[i,0])!="":
for i in range(firstindex+count,np.size(table,0)):
if str(table[i,column])!="":
subtablesindex.append((firstindex,i-1))
firstindex=i
subtablesindex.append((firstindex,np.size(table,0)))