benchmark/analysis.py
def split_df(df: pd.DataFrame, pred):
    """
    Return a pair whose first element is the orginal dataset where the predicate
    `pred` holds, while the second is the orginal dataset where the predicate
    `pred` does not hold.
    :param df: A dataframe.
    :param pred: A predicate.
    """
    df1 = pd.DataFrame([df.loc[i] for i in range(len(df)) if pred(df.loc[i])], columns=df.columns)
    df2 = pd.DataFrame([df.loc[i] for i in range(len(df)) if not pred(df.loc[i])], columns=df.columns)
    return (df1, df2)

    Return a pair whose first element is the orginal dataset where the predicate
    `pred` holds, while the second is the orginal dataset where the predicate
    `pred` does not hold.
    :param df: A dataframe.
    :param pred: A predicate.
    
Return a pair whose first element is the orginal dataset where the predicate
`pred` holds, while the second is the orginal dataset where the predicate
`pred` does not hold.
Return a pair whose first element is the orginal dataset where the predicate ` pred ` holds while the second is the orginal dataset where the predicate ` pred ` does not hold .
def split_df(df: pd.DataFrame, pred):
    df1 = pd.DataFrame([df.loc[i] for i in range(len(df)) if pred(df.loc[i])], columns=df.columns)
    df2 = pd.DataFrame([df.loc[i] for i in range(len(df)) if not pred(df.loc[i])], columns=df.columns)
    return (df1, df2)
def split_df ( df : pd . DataFrame , pred ) : df1 = pd . DataFrame ( [ df . loc [ i ] for i in range ( len ( df ) ) if pred ( df . loc [ i ] ) ] , columns = df . columns ) df2 = pd . DataFrame ( [ df . loc [ i ] for i in range ( len ( df ) ) if not pred ( df . loc [ i ] ) ] , columns = df . columns ) return ( df1 , df2 )
Return a pair whose first element is the orginal dataset where the predicate
`pred` holds, while the second is the orginal dataset where the predicate
`pred` does not hold.
Return a pair whose first element is the orginal dataset where the predicate ` pred ` holds while the second is the orginal dataset where the predicate ` pred ` does not hold .
"""
    Return a pair whose first element is the orginal dataset where the predicate
    `pred` holds, while the second is the orginal dataset where the predicate
    `pred` does not hold.
    :param df: A dataframe.
    :param pred: A predicate.
    """
df
pd.DataFrame
None
pred
None