def rescaling(data, range_low=0.0, range_high=1.0):
    """ rescales pandas data frame between range_low and range_high """

    for (column_name, column_data) in data.iteritems():
        min_value = column_data.min()
        max_value = column_data.max()

        #index counter for loc 
        index = 0
        for value in column_data:
            value_rescaled = ((value-min_value)*(range_high-range_low)) / (max_value-min_value)
            data.loc[index,column_name] = value_rescaled
            index += 1

    return(data)