Python Forum

Full Version: How from sklearn.datasets import load_diabetes change to import to CSV file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
#I test and check some predictions on the Hospital data set on CSV file rather than loading data set like diabetes data set.
## I want to import a CSV file instead of load as -----> Where sklearn should be kept in mind for data preprocessing
 from sklearn.datasets import load_diabetes 
How such changes had been made while remove load_diabetes and add a csv file i search but i did not find such answer
import numpy as np
from sklearn.datasets import load_diabetes
seed = 43
np.random.seed(seed)
print("Loading data")
    diabetes = load_diabetes()
    y = diabetes.target
    X = diabetes.data