<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def binarize(qualitative):
 """ binarizes an expression dataset. """

    thresholds = qualitative.min(1) + (qualitative.max(1) - qualitative.min(1))/2.0
    binarized = qualitative > thresholds.reshape((len(thresholds), 1)).repeat(8,1)
    return binarized.astype(int)