estoy siguiendo el modulo de machine learning y en la parte de la elaboración del modelo knn me sale el siguiente error que es por que no hay la misma cantidad de columnas para estandarizar , como puedo resolverlo ?
Xmaria_std= scaler.transform(pd.DataFrame(Xmaria, columns=x.columns))
AssertionError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/pandas/core/internals/construction.py in _finalize_columns_and_data(content, columns, dtype) 968 try: --> 969 columns = _validate_or_indexify_columns(contents, columns) 970 except AssertionError as err:
5 frames AssertionError: 38 columns passed, passed data had 39 columns
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/pandas/core/internals/construction.py in finalize_columns_and_data(content, columns, dtype) 970 except AssertionError as err: 971 # GH#26429 do not raise user-facing AssertionError --> 972 raise ValueError(err) from err 973 974 if len(contents) and contents[0].dtype == np.object:
ValueError: 38 columns passed, passed data had 39 columns