@classmethod
def from_DataFrame(clazz, df, unique_transactions=False, drop_NaN=True,
    target=None):
    """
        Allows the conversion of pandas DataFrame class to 
        TransactionDB class.

        Parameters
        ----------
        
        df: pandas DataFrame
            A DataFrame from which to create a TransactionDB.
    
        unique_transactions: bool
            Determines if UniqueTransaction or Transaction class
            should be used for individual instances.

        drop_NaN: bool
            Used for determining whether a an Item
            with NULL value should be dropped from Transaction.

        target: str, default None
            Name of an existing column in df. This column will
            be taken as a class target.
        """
    if target is not None:
        if type(target) != str:
            raise Exception("'target' should be a string")
        if target not in df.columns.values:
            raise Exception("'target' must be in df columns")
        new_columns = list(df.columns.values)
        new_columns.pop(new_columns.index(target))
        new_columns.append(target)
        df = df[new_columns]
    rows = df.values
    header = list(df.columns.values)
    return clazz(rows, header, unique_transactions=unique_transactions,
        drop_NaN=drop_NaN)
