MAINT: test_encoder_dtypes_pandas reads expected dtype from DF
@@ -596,7 +596,7 @@ def test_encoder_dtypes_pandas():
assert_array_equal(enc.transform(X).toarray(), exp)
X = pd.DataFrame({'A': [1, 2], 'B': ['a', 'b'], 'C': [3., 4.]})
- X_type = [int, object, float]
+ X_type = [X['A'].dtype, X['B'].dtype, X['C'].dtype]
enc.fit(X)
assert all([enc.categories_[i].dtype == X_type[i] for i in range(3)])
assert_array_equal(enc.transform(X).toarray(), exp)
