#! /usr/bin/env python
#
# Copyright 2021 John Hanley.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# The software is provided "AS IS", without warranty of any kind, express or
# implied, including but not limited to the warranties of merchantability,
# fitness for a particular purpose and noninfringement. In no event shall
# the authors or copyright holders be liable for any claim, damages or
# other liability, whether in an action of contract, tort or otherwise,
# arising from, out of or in connection with the software or the use or
# other dealings in the software.
#
from sklearn.datasets import load_boston

# https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_boston.html


# from https://www.datacamp.com/community/tutorials/xgboost-in-python
def predict_boston_home_prices():
    print(load_boston())


if __name__ == '__main__':
    predict_boston_home_prices()

@@ -1103,16 +1103,18 @@
 ware.%0A#%0A
+# 
 from skl
@@ -1146,18 +1146,42 @@
 _boston%0A
-%0A#
+import pandas as pd%0A%0A%0A# cf
  https:/
@@ -1257,16 +1257,295 @@
 on.html%0A
+def _load_boston():%0A    data_url = %22http://lib.stat.cmu.edu/datasets/boston%22%0A    raw_df = pd.read_csv(data_url, sep=r'%5Cs+', skiprows=22, header=None)%0A    # data = np.hstack(%5Braw_df.values%5B::2, :%5D, raw_df.values%5B1::2, :2%5D%5D)%0A    # target = raw_df.values%5B1::2, 2%5D%0A    return raw_df%0A
 %0A%0A# from
@@ -1650,14 +1650,18 @@
     
-print(
+boston = _
 load
@@ -1669,16 +1669,71 @@
 boston()
+%0A    assert (1012, 11) == boston.shape%0A    print(boston
 )%0A%0A%0Aif _

Switch to _load_boston()