Dataset acquisition issue #1
-
Is anyone having issues in fetching the California dataset on Jupyter? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 5 replies
-
Yes, encountered the same problem a few days ago. |
Beta Was this translation helpful? Give feedback.
-
Try upgrading the dependencies and check whether its working.
|
Beta Was this translation helpful? Give feedback.
-
I've upgraded the pip and scikit with Python 3.10, but the issue persists. Is it working on your end? |
Beta Was this translation helpful? Give feedback.
-
I checked the traceback issues they were facing, and tried an alternate approach but couldn't get the download to work yet. |
Beta Was this translation helpful? Give feedback.
-
Does any know how to download it manually? |
Beta Was this translation helpful? Give feedback.
-
I have an idea. The process works with IDE like PyCharm. So you can download and store it as a CSV extension. Then load the dataset in Jupyter and proceed with the EDA. Here's the code: import pandas as pd
from sklearn.datasets import fetch_california_housing
# Acquire the data
california_data = fetch_california_housing()
# Construct the dataset
features = pd.DataFrame(california_data['data'], columns=california_data['feature_names'])
label = pd.DataFrame(california_data['target'], columns=california_data['target_names'])
dataset = pd.concat([features, label], axis=1)
# Store the dataset as a CSV extension
output_path = 'california_housing_dataset.csv'
try:
dataset.to_csv(output_path, sep=',', index=False)
except Exception as exc:
print(f"An error occurred: {exc}")
else:
print("Conversion successful.") |
Beta Was this translation helpful? Give feedback.
-
@shahriar-rahman, did you complete it? |
Beta Was this translation helpful? Give feedback.
I have an idea. The process works with IDE like PyCharm. So you can download and store it as a CSV extension. Then load the dataset in Jupyter and proceed with the EDA. Here's the code: