def get_best_value(data, index, maximum=True):
""" Returns the 'best' value from a given column in a2-dimensional nested list. This function is a helper function forget_minimums (whose docstring you should read and understandfirst). The data parameter is a 2-dimensional nested list of data.The index parameter indicates which "colummn" of data should beevaluated. Each item in that column is expected to be a number instring format. Each item should be evaluated as a float and thebest value selected as the return value for the function. The bestvalue is determined by the maximum parameter and is either thehighest or lowest float value. The 2D list does not include aheader row. It should not be modified in any way. Parameter data: a2-dimensional nested list of data Precondition: the columnreferenced by index should by numbers in string format Parameterindex: position to examine in each row of data Precondition: indexis a an integer Parameter maximum: indicates whether to return thehighest value (True) or lowest value (False) Precondition: maximumis a boolean and defaults to True
"""
# Find the best values for each column of the row
def get_best_value(data, index, maximum=True): """ Returns the 'best' value from a given column in a 2-dimensional neste
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am