728x90
<Python>/[오류 메세지]
-
TypeError: float() argument must be a string or a number, not 'method'<Python>/[오류 메세지] 2022. 6. 30. 16:18
- 사례 1 from sklearn.experimental import enable_iterative_imputer from sklearn.impute import IterativeImputer # train = 아무 데이터프레임 가능 (대신 모든변수가 float, int 형태) df = train.copy # train.copy()로 변경 df = IterativeImputer(random_state=2021).fit_transform(df) df = pd.DataFrame(df) df.columns = train.columns df - 사례2