Use the dataset name to build the filenames in the sheets metadata
    :param list sheets: Sheet metadata
    :param str n: Dataset Name
    :return list: Sheet metadata
433533
def __set_sheet_filenames(sheets, n):
    
    try:
        for idx, sheet in enumerate(sheets):
            try:
                sheets[idx]["filename"] = "{}.{}".format(n, sheet["filename"])
            except Exception as e:
                logger_excel.error("set_sheet_filenames: inner: {}".format(e), exc_info=True)
    except Exception as q:
        logger_excel.error("set_sheet_filenames: outer: {}".format(q), exc_info=True)
    return sheets
1291926
def __rm_names_on_csv_cols(d):
        
        _names = []
        _data = []
        for name, data in d.items():
            _names.append(name)
            _data.append(data)
        return _names, _data
279549
def make_worksheet(self, sheet_name=None):
        

        if sheet_name is None:
            sheet_name = self.table_name
        if not sheet_name:
            sheet_name = ""

        self._stream = self.workbook.add_worksheet(sheet_name)
        self._current_data_row = self._first_data_row
772282
def update_fid_list(self,filename,N):
        '''
        
        '''
        self.filelist_count[self.filelist.index(filename)] = N
        fid=self.fid_list.compress([enum[1][0] == os.path.basename(filename) for enum in enumerate(zip(*(self.filelist,self.fid_list)))])
        self.__dict__.update({'fileid' :np.append(self.fileid,np.repeat(fid,N))})
1117041
def get_data_table(filename):
  """"""
  with get_file_object(filename, "r") as rf:
    return DataTable(list(csv.reader(rf)))
1005009
def restricted_to_files(self,
                            filenames: List[str]
                            ) -> 'Spectra':
        
        tally_passing = \
            {fn: entries for (fn, entries) in self.__tally_passing.items() \
             if fn in filenames}
        tally_failing = \
            {fn: entries for (fn, entries) in self.__tally_failing.items() \
             if fn in filenames}
        return Spectra(self.__num_passing,
                       self.__num_failing,
                       tally_passing,
                       tally_failing)
1031089
def get_filenames(is_training, data_dir):
  """"""
  if is_training:
    return [
        os.path.join(data_dir, 'train-%05d-of-01024' % i)
        for i in range(_NUM_TRAIN_FILES)]
  else:
    return [
        os.path.join(data_dir, 'validation-%05d-of-00128' % i)
        for i in range(128)]
934431
def setFilenames( self, filenames ):
        
        mapped = []
        for filename in filenames:
            filename = nativestring(filename)
            if ( not filename ):
                continue
            
            mapped.append(filename)
            if ( len(mapped) == self.maximumLength() ):
                break
        
        self._filenames = mapped
        self.refresh()
368547
def __load_list(self, config_filename, file_names):
        
        self._read_configuration_file(config_filename)
        self.connect()
        self.find_source_files_from_list(file_names)
        self._get_column_type()
        self.__read_stored_routine_metadata()
        self.__get_constants()
        self._get_old_stored_routine_info()
        self._get_correct_sql_mode()
        self.__load_stored_routines()
        self.__write_stored_routine_metadata()
        self.disconnect()
357513
def get_names():
    
    return [n.strip() for n in codecs.open(os.path.join("data", "names.txt"),"rb",'utf8').readlines()]
1109652
def choose_raw_dataset(currently=""):
    """"""
    folder = os.path.join(get_project_root(), "raw-datasets")
    files = [os.path.join(folder, name) for name in os.listdir(folder)
             if name.endswith(".pickle")]
    default = -1
    for i, filename in enumerate(files):
        if os.path.basename(currently) == os.path.basename(filename):
            default = i
        if i != default:
            print("[%i]\t%s" % (i, os.path.basename(filename)))
        else:
            print("\033[1m[%i]\033[0m\t%s" % (i, os.path.basename(filename)))
    i = input_int_default("Choose a dataset by number: ", default)
    return files[i]
363596
def prepare_defined_names #:nodoc:
      @worksheets.each do |sheet|
        # Check for Print Area settings.
        if sheet.autofilter_area
          @defined_names << [
                             '_xlnm._FilterDatabase',
                             sheet.index,
                             sheet.autofilter_area,
                             1
                            ]
        end

        # Check for Print Area settings.
        if !sheet.print_area.empty?
          @defined_names << [
                             '_xlnm.Print_Area',
                             sheet.index,
                             sheet.print_area
                            ]
        end

        # Check for repeat rows/cols. aka, Print Titles.
        if !sheet.print_repeat_cols.empty? || !sheet.print_repeat_rows.empty?
          if !sheet.print_repeat_cols.empty? && !sheet.print_repeat_rows.empty?
            range = sheet.print_repeat_cols + ',' + sheet.print_repeat_rows
          else
            range = sheet.print_repeat_cols + sheet.print_repeat_rows
          end

          # Store the defined names.
          @defined_names << ['_xlnm.Print_Titles', sheet.index, range]
        end
      end

      @defined_names  = sort_defined_names(@defined_names)
      @named_ranges  = extract_named_ranges(@defined_names)
    end
982299
def header(self, sheet, name):
        

        header = sheet.row(0)
        for i, column in enumerate(self.headers[name]):
            header.write(i, self.headers[name][i])
973397
def __put_names_on_csv_cols(names, cols):
        
        _combined = {}
        for idx, name in enumerate(names):
            # Use the variableName, and the column data from the same index
            _combined[name] = cols[idx]



        return _combined
307229
def make_table(data, col_names):
    
    n_cols = len(data[0])
    assert n_cols == len(col_names)
    col_sizes = [max(len(r[i]) for r in data) for i in range(n_cols)]
    for i, cname in enumerate(col_names):
        if col_sizes[i] < len(cname):
            col_sizes[i] = len(cname)
    formatter = ' '.join('{:<%d}' % c for c in col_sizes)
    rows = '\n'.join([formatter.format(*row) for row in data])
    header = formatter.format(*col_names)
    divider = formatter.format(*['=' * c for c in col_sizes])
    output = '\n'.join((divider, header, divider, rows, divider))
    return output
196925
def file_names(self) -> Iterable[str]:
        
        if self.is_sharded():
            yield from ShardedFile(self.filename_spec).get_filenames()
        elif self.filename_spec:
            yield self.filename_spec
668838
def save_dataset(self, dataset, filename=None, fill_value=None, **kwargs):
        """"""
        return self.save_datasets([dataset], filename, **kwargs)