def split_data(data, train_len) :
    """Split a dataframe into train and test data
    
    Parameters
    ----------
    data : pandas.core.frame.DataFrame
        Dataframe to split

    train_len : float
        Percentage of data for training

    Returns
    -------
    pandas.core.frame.DataFrame
        a dataframe with the train data

    pandas.core.frame.DataFrame
        a dataframe with the test data
    """

    #calculate the index on which to split the data
    train_split = int(len(data)*train_len)

    #split the data into train and test
    train_data = data[0:train_split]
    test_data = data[train_split+1:len(data)]

    #return the splitted data
    return train_data, test_data