fairness_instru.py
def find_pd_lines(pipeline_func):
    """
    function used for extract pandas operations from raw pipeline codes.

    args:
        pipeline_func: raw pipeline codes. String.

    return:
        rows including pandas operations.
    """
    pipeline_func = inspect.getsource(pipeline_func)
    pd_lines = []
    input_args , executable_list, _ = func_aggregation(pipeline_func)
    for line in input_args:
        exec(line)
    for cur_line in executable_list:
        exec(cur_line)
        try:
            if 'inplace' in cur_line:
                pd_lines.append(cur_line)
            elif str(eval(f"type({cur_line.split('=')[0].strip()})")).startswith("<class 'pandas"):
                pd_lines.append(cur_line)
        except:
            pass
    return pd_lines

    function used for extract pandas operations from raw pipeline codes.

    args:
        pipeline_func: raw pipeline codes. String.

    return:
        rows including pandas operations.
    
function used for extract pandas operations from raw pipeline codes.
args:
pipeline_func: raw pipeline codes. String.

rows including pandas operations.
function used for extract pandas operations from raw pipeline codes . args : pipeline_func : raw pipeline codes . String . rows including pandas operations .
def find_pd_lines(pipeline_func):
    pipeline_func = inspect.getsource(pipeline_func)
    pd_lines = []
    input_args , executable_list, _ = func_aggregation(pipeline_func)
    for line in input_args:
        exec(line)
    for cur_line in executable_list:
        exec(cur_line)
        try:
            if 'inplace' in cur_line:
                pd_lines.append(cur_line)
            elif str(eval(f"type({cur_line.split('=')[0].strip()})")).startswith("<class 'pandas"):
                pd_lines.append(cur_line)
        except:
            pass
    return pd_lines
def find_pd_lines ( pipeline_func ) : pipeline_func = inspect . getsource ( pipeline_func ) pd_lines = [ ] input_args , executable_list , _ = func_aggregation ( pipeline_func ) for line in input_args : exec ( line ) for cur_line in executable_list : exec ( cur_line ) try : if 'inplace' in cur_line : pd_lines . append ( cur_line ) elif str ( eval ( f"type({cur_line.split('=')[0].strip()})" ) ) . startswith ( "<class 'pandas" ) : pd_lines . append ( cur_line ) except : pass return pd_lines
function used for extract pandas operations from raw pipeline codes.
function used for extract pandas operations from raw pipeline codes .
"""
    function used for extract pandas operations from raw pipeline codes.

    args:
        pipeline_func: raw pipeline codes. String.

    return:
        rows including pandas operations.
    """
pipeline_func