A model was trained on a table of standardised data. Now new rows arrive, and they must be scaled in exactly the same way as the training data, so the model sees them on the same scale.
That means each column's average and spread come from the training table only. The new rows never change them, even when there is just one new row.
train and new_rows are lists of rows with the same columns. For each column j of the training table, work out its average and its spread (the same .std() as in the lesson). Then, for every new row, its value in column j becomes:
One catch: if every training value in a column is the same, that column's spread is 0 and the division would break. Such a column tells the model nothing, so put 0.0 in that column for every new row.
Task: write scale_new(train, new_rows). Return the scaled new rows as a list of lists, one inner list per new row, with every value rounded to 4 decimal places.