We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa0df21 commit 6a5b357Copy full SHA for 6a5b357
tests/conftest.py
@@ -471,13 +471,14 @@ def airline_dataset():
471
@pytest.fixture
472
def boston_dataset():
473
"""Regression dataset."""
474
- pytest.importorskip('sklearn')
475
pd = pytest.importorskip('pandas')
476
- from sklearn import datasets
477
478
- raw = datasets.load_boston()
479
- df = pd.DataFrame(raw.data, columns=raw.feature_names)
480
- df['Price'] = raw.target
+ df = pd.read_csv('examples/data/boston_house_prices.csv')
+
+ # Uppercase column names to match names used by scikit-learn (dataset was originally loaded through
+ # sklearn before it was removed in v1.2).
+ df.columns = [c.upper() for c in df.columns]
481
+ df = df.rename(columns={"MEDV": "Price"})
482
return df
483
484
0 commit comments