الف شكرااا لحضرتك جدا
جزاك الله كل خير
طيب معليش بس هو الكود ده اي الاخطاء
data_train = ordinalencoder_data(data_train)
original_dtypes = data_train.dtypes.copy()
imputer = IterativeImputer(max_iter=5 , random_state=42 , initial_strategy='mean')
imputer_data = imputer.fit_transform(data_train)
data_train = pd.DataFrame(imputer_data , columns=data_train.columns)
data_train[original_dtypes.select_dtypes(include=['int64']).columns] = original_dtypes.select_dtypes(include=['int64']).astype(int)
print(data_train.info())