code: def col_name2cat(column):
      
      column_string = ''.join(s for s in column.replace(' ', '_') if s.isalnum() or '_' == s)
      return column_string
docs: Reformats the column string to make sure it contains only numerical, letter characters or underscore.
  
      :param column: column name to be reformatted
      :type column: str
      :return: column name with illegal characters removed
      :rtype: str