10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 13:53:48 +01: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 @staticmethod
def readFromTable(table,format=Format.LINE,default=dataType.ABS ,firstState=state(1,1,"A_1"),commands=[]): 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() subtablesindex=list()
firstindex=2 for i in range(firstindex+count,np.size(table,0)):
for i in range(3,np.size(table,0)): if str(table[i,column])!="":
if str(table[i,0])!="":
subtablesindex.append((firstindex,i-1)) subtablesindex.append((firstindex,i-1))
firstindex=i firstindex=i
subtablesindex.append((firstindex,np.size(table,0))) subtablesindex.append((firstindex,np.size(table,0)))