Key Error: None of [Int64Index…] dtype=’int64] are in the columns

You created your scaled_inputs_all DataFrame using loc
function, so it most likely contains no consecutive indices.

On the other hand, you created shuffled_indices as a shuffle
from just a range of consecutive numbers.

Remember that scaled_inputs_all[shuffled_indices] gets rows
of scaled_inputs_all which have index values equal to
elements of shuffled_indices.

Maybe you should write:

scaled_inputs_all.iloc[shuffled_indices]

Note that iloc provides integer-location based indexing, regardless of
index values, i.e. just what you need.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)