Код: Выделить всё
import pandas as pd
from feature_engine.encoding import MeanEncoder
X = pd.DataFrame(dict(x1 = [1,2,3,4,5], x2 = ["c", "c", "c", "b", "a"]))
y = pd.Series([0,1,1,1,0])
me = MeanEncoder()
me.fit(X,y)
me.transform(X)
Код: Выделить всё
228 counts.index = counts.index.infer_objects()
AttributeError: 'Index' object has no attribute 'infer_objects'
Подробнее здесь: https://stackoverflow.com/questions/792 ... er-objects
Мобильная версия