We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31714cc commit 478489eCopy full SHA for 478489e
tests/test_dataframe_mapper.py
@@ -51,6 +51,17 @@ def test_with_iris_dataframe(iris_dataframe):
51
assert (scores.std() * 2) < 0.04
52
53
54
+def test_get_col_subset_single_column_array(iris_dataframe):
55
+ """
56
+ Selecting a single column should return a 1-dimensional numpy array.
57
58
+ mapper = DataFrameMapper(None)
59
+ array = mapper._get_col_subset(iris_dataframe, "species")
60
+
61
+ assert type(array) == np.ndarray
62
+ assert array.shape == (len(iris_dataframe["species"]),)
63
64
65
def test_with_car_dataframe(cars_dataframe):
66
pipeline = Pipeline([
67
("preprocess", DataFrameMapper([
0 commit comments