Skip to content

Commit e3cfea1

Browse files
minor changes to avoid convertion type warnings from sklearn transformers
1 parent 5b0e7a0 commit e3cfea1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Normally you'll read the data from a file, but for demonstration purposes we'll
5757

5858
>>> data = pd.DataFrame({'pet': ['cat', 'dog', 'dog', 'fish', 'cat', 'dog', 'cat', 'fish'],
5959
... 'children': [4., 6, 3, 3, 2, 3, 5, 4],
60-
... 'salary': [90, 24, 44, 27, 32, 59, 36, 27]})
60+
... 'salary': [90., 24, 44, 27, 32, 59, 36, 27]})
6161

6262
Transformation Mapping
6363
----------------------

tests/test_dataframe_mapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,8 @@ def test_list_transformers():
625625
Specifying a list of transformers applies them sequentially to the
626626
selected column.
627627
"""
628-
dataframe = pd.DataFrame({"a": [1, np.nan, 3], "b": [1, 5, 7]})
628+
dataframe = pd.DataFrame({"a": [1, np.nan, 3], "b": [1, 5, 7]},
629+
dtype=np.float64)
629630

630631
mapper = DataFrameMapper([
631632
(["a"], [Imputer(), StandardScaler()]),

0 commit comments

Comments
 (0)