def METHOD_NAME(data):
    """
    Convert string values to float or int where possible
    Parameters
    ----------
    data : list of dict
        A list of datasets.
    Returns
    -------
    list of dict
        A list of datasets with string values converted to float or int where possible.
    Examples
    --------
    >>> data = [{'amount': '10.0'}, {'exchanges': [{'amount': '20', 'uncertainty type': 'undefined'}]}]
    >>> csv_numerize(data)
    [{'amount': 10.0}, {'exchanges': [{'amount': 20, 'uncertainty type': 'undefined'}]}]
    """
    def _(x):
        try:
            return float(x)
        except:
            return x
    for ds in data:
        for key, value in ds.items():
            if isinstance(value, str):
                ds[key] = _(value)
        for exc in ds.get("exchanges", []):
            for key, value in exc.items():
                if isinstance(value, str):
                    exc[key] = _(value)
    return data