Assistance with replicating the code from data science>linear regression>exploratory data analysis in Google Co Lab?
I am trying to replicate this bit of code, taken from a SoloLearn module, in Google Colab: import pandas as pd from sklearn.datasets import load_boston boston_dataset = load_boston() boston = pd.DataFrame(boston_dataset.data, columns = boston_dataset.feature_names) boston['MEDV']=boston_dataset.target print(boston.shape) However, it is outputting an error message which I am unsure what to make of as I am but a lowly learner on this app. The people in the comments recommend using Google Colab to replicate many of the codes in the Data Science module (pretty much everything past the data visualization part) This is the error that I have no idea what to make of. --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-e3316386af48> in <cell line: 2>() 1 import pandas as pd ----> 2 from sklearn.datasets import load_boston 3 boston_dataset = load_boston() 4 boston = pd.DataFrame(boston_dataset.data, 5 /usr/local/lib/python3.10/dist-packages/sklearn/datasets/__init__.py in __getattr__(name) 154 """ 155 ) --> 156 raise ImportError(msg) 157 try: 158 return globals()[name] ImportError: `load_boston` has been removed from scikit-learn since version 1.2. The Boston housing prices dataset has an ethical problem: as investigated in [1], the authors of this dataset engineered a non-invertible variable "B" assuming that racial self-segregation had a positive impact on house prices [2]. Furthermore the goal of the research that led to the creation of this dataset was to study the impact of air quality but it did not give adequate demonstration of the validity of this assumption. The scikit-learn maintainers therefore strongly discourage the use of this dataset unless the purpose of the code is to study and educate about ethical issues in data science and machine learning. In this special case, you can fetc