ValueError: too many values to unpack (expected 2)

Because proc_df can either return 3 or 4

https://github.com/fastai/fastai/blob/master/fastai/structured.py

x , y, nas, mapper

Returns:
    --------
    [x, y, nas, mapper(optional)]:
        x: x is the transformed version of df. x will not have the response variable
            and is entirely numeric.
        y: y is the response variable
        nas: returns a dictionary of which nas it created, and the associated median.
        mapper: A DataFrameMapper which stores the mean and standard deviation of the corresponding continous
        variables which is then used for scaling of during test-time.

4 Likes