eccpy/tools.py
def format_cols_2digit(df, skip_last_col=True):
    """Formats a dataframes columns so that numbers are always two-digits (padded with 0)

    Parameters
    ----------
    df : pandas DataFrame
        Input DataFrame.
    skip_last_col : bool
        A special case, where the very last column contains text, rather than a number, and should be excluded.

    Returns
    -------
    reformatted_cols : list
        The DataFrame columns, reformatted with padded 0 to make 2 digits.

    """
    if skip_last_col:
        # reformat the columns to be padded stringnumbers. (exclude the last "Contains_Data")
        reformatted_cols = ["%02d" % col for col in df.columns[:-1]]
        # add last column back to list
        reformatted_cols.append(df.columns[-1])
    else:
        # reformat the columns to be padded stringnumbers. (exclude the last "Contains_Data")
        reformatted_cols = ["%02d" % col for col in df.columns]

    return reformatted_cols
Formats a dataframes columns so that numbers are always two-digits (padded with 0)

    Parameters
    ----------
    df : pandas DataFrame
        Input DataFrame.
    skip_last_col : bool
        A special case, where the very last column contains text, rather than a number, and should be excluded.

    Returns
    -------
    reformatted_cols : list
        The DataFrame columns, reformatted with padded 0 to make 2 digits.

    
Formats a dataframes columns so that numbers are always two-digits (padded with 0)
Parameters



Returns

reformatted_cols : list
The DataFrame columns, reformatted with padded 0 to make 2 digits.
Formats a dataframes columns so that numbers are always two - digits ( padded with 0 ) Parameters Returns reformatted_cols : list The DataFrame columns reformatted with padded 0 to make 2 digits .
def format_cols_2digit(df, skip_last_col=True):
    if skip_last_col:
        reformatted_cols = ["%02d" % col for col in df.columns[:-1]]
        reformatted_cols.append(df.columns[-1])
    else:
        reformatted_cols = ["%02d" % col for col in df.columns]
    return reformatted_cols
def format_cols_2digit ( df , skip_last_col = True ) : if skip_last_col : reformatted_cols = [ "%02d" % col for col in df . columns [ : - 1 ] ] reformatted_cols . append ( df . columns [ - 1 ] ) else : reformatted_cols = [ "%02d" % col for col in df . columns ] return reformatted_cols
Formats a dataframes columns so that numbers are always two-digits (padded with 0)
Parameters
Formats a dataframes columns so that numbers are always two - digits ( padded with 0 ) Parameters
"""Formats a dataframes columns so that numbers are always two-digits (padded with 0)

    Parameters
    ----------
    df : pandas DataFrame
        Input DataFrame.
    skip_last_col : bool
        A special case, where the very last column contains text, rather than a number, and should be excluded.

    Returns
    -------
    reformatted_cols : list
        The DataFrame columns, reformatted with padded 0 to make 2 digits.

    """ # reformat the columns to be padded stringnumbers. (exclude the last "Contains_Data") # add last column back to list # reformat the columns to be padded stringnumbers. (exclude the last "Contains_Data")
df
skip_last_col