<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Build a function in Python for selecting all rows from a Pandas DataFrame where a column value is equal to a given value.
df = pd.DataFrame({'A':[1, 2, 3, 4, 5],
                   'B':[2, 3, 4, 5, 6],
                   'C':[3, 4, 5, 6, 7],
                   'D':[4, 5, 6, 7, 8]})
col_1 = 'A' 
value = 3<|im_end|>
<|im_start|>assistant
def select_rows(df, col_1, value): 
    return df[df[col_1] == value]<|im_end|>
