Python Forum
How from sklearn.datasets import load_diabetes change to import to CSV file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How from sklearn.datasets import load_diabetes change to import to CSV file
#1
#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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 10 22,012 May-26-2025, 01:55 PM
Last Post: deanhystad
  How can I write formatted (i.e. bold, italic, change font size, etc.) text to a file? JohnJSal 13 29,263 May-20-2025, 12:26 PM
Last Post: hanmen9527
Question Import vs from x import Calab 1 424 May-15-2025, 04:09 PM
Last Post: snippsat
  I'm trying to import a dataset into a Jupyter Notebook Hisilat03 0 860 Mar-24-2025, 09:26 AM
Last Post: Hisilat03
  beginner doesn't understand import cimerio 3 698 Feb-12-2025, 05:02 PM
Last Post: cimerio
  How to write variable in a python file then import it in another python file? tatahuft 4 1,157 Jan-01-2025, 12:18 AM
Last Post: Skaperen
  Python: How to import data from txt, instead of running the data from the code? Melcu54 1 764 Dec-13-2024, 06:50 AM
Last Post: Gribouillis
  python 3.13 : import whois HansieB 1 790 Nov-30-2024, 02:58 PM
Last Post: snippsat
Question [SOLVED] Why "import foo" + "from foo import bar"? Winfried 4 1,456 Nov-26-2024, 08:13 AM
Last Post: Winfried
  [SOLVED] [Linux] Write file and change owner? Winfried 6 1,859 Oct-17-2024, 01:15 AM
Last Post: Winfried

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020