def convertsColsToArray(conn, table_name, indep, dep=''): 
    tbl_schema = 'public' if '.' not in table_name else table_name.split('.')[0]
    tbl_nm = table_name.split('.')[1] if '.' in table_name else table_name
    col_types_dict = __getColTypesDict__(conn,tbl_schema, tbl_nm)
    out_tbl_nm = tbl_nm.replace(default_prefix,'')
    output_table = '{default_schema}.{default_prefix_arr}{table_name}'.format(default_schema=default_schema, 
                                                                          default_prefix_arr=default_prefix_arr, 
                                                                          table_name=out_tbl_nm
                                                                          )
    indep_cols_arr_name = 'indep'
    #Check all columns are numeric      
    for col in indep:
        if (
               (col_types_dict.has_key(col) and col_types_dict[col] in ['char','character varying', 'text']) or 
               (not col_types_dict.has_key(col) and not isNumeric(col))
           ):
            raise 'Only numeric columns supported. Use pivotCategoricalColumns() to transform categorical columns'
            return 
    
    #Verify if all columns are numeric
    data_dict = {}
    data_dict['table_name'] = table_name
    data_dict['output_table'] = output_table
    data_dict['list_of_indep_cols'] = ','.join(indep)
    data_dict['indep_cols_arr_name'] = indep_cols_arr_name
    if(dep):
        convert_to_arr_stmt = '''
                                 drop table if exists {output_table} cascade;
                                 create table {output_table} as 
                                 (
                                     select array[{list_of_indep_cols}] as {indep_cols_arr_name},
                                            {dep}
                                     from {table_name}
                                 );
                              ''' 
        data_dict['dep'] = dep
    else:
        convert_to_arr_stmt = '''
                                 drop table if exists {output_table} cascade;
                                 create table {output_table} as 
                                 (
                                     select array[{list_of_indep_cols}] as {indep_cols_arr_name}
                                     from {table_name}
                                 );
                              '''               
        
    convert_to_arr_stmt = convert_to_arr_stmt.format(**data_dict)                              
    conn.executeQuery(convert_to_arr_stmt)
    return output_table, indep_cols_arr_name
Returns the given string converted to a string that can be used for a clean
dataset/ETHPy150Open pivotalsoftware/pymadlib/pymadlib/utils.py/convertsColsToArray--crossover with--dataset/ETHPy150Open quantmind/lux/lux/utils/files.py/get_valid_filename