def parse_colname(colname):
    """ Common function to interpret input column names provided by the user.

        This function translates column specification provided by the user
        into a column number.

        Notes
        -----
        This function will understand the following inputs::

            '1,2,3' or   'c1,c2,c3' or ['c1','c2','c3']
            '1-3'   or   'c1-c3'
            '1:3'   or   'c1:c3'
            '1 2 3' or   'c1 c2 c3'
            '1'     or   'c1'
            1

        Parameters
        ----------
        colname :
            Column name or names to be interpreted

        Returns
        -------
        cols : list
            The return value will be a list of strings.

    """
    if isinstance(colname,list):
        cname = ''
        for c in colname:
            cname += str(c)+','
        cname = cname.rstrip(',')
    elif isinstance(colname,int) or colname.isdigit():
        cname = str(colname)
    else:
        cname = colname

    if 'c' in cname[0]: cname = cname.replace('c','')

    ctok = None
    cols = None
    if '-' in cname:
        ctok = '-'
    if ':' in cname:
        ctok = ':'
    if ctok is not None:
        cnums = cname.split(ctok)
        c = list(range(int(cnums[0]),int(cnums[1])+1))
        cols = []
        for i in c:
            cols.append(str(i))

    if cols is None:
        ctok = ' '
        if ',' in cname:
            ctok = ','
        cols = cname.split(ctok)

    return cols