The following will break down, because if the CSV first element only has 1 column, this will return return_cols=0 and thus return 0 data
Need to fix this in the below: data[0]
if len(kwargs)==0:
return_cols=len(data[0])-1
elif ('return_cols' in kwargs.keys() and
type(kwargs['return_cols'])==int and
kwargs['return_cols']<=len(data[0])-1 and
kwargs['return_cols']>0):
if len(kwargs)==0:
return_cols=len(data[4])-1
elif ('return_cols' in kwargs.keys() and
type(kwargs['return_cols'])==int and
kwargs['return_cols']<=len(data[4])-1 and
kwargs['return_cols']>0):
The following will break down, because if the CSV first element only has 1 column, this will return return_cols=0 and thus return 0 data
Need to fix this in the below: data[0]