Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing Dataset
#1
Howdie!

Not sure if I can post this here, or if it belongs to data analysis.

So I'm importing a dataset and defining x and y.

Here's the code:

dataset=pd.read_csv("Data.csv", sep=",")
X=dataset.iloc[:, :-1].values
y=dataset.iloc[:, :3].values
Problem is, in the console and the array, the output is exactly the same for both x and y, though in y it should only show one column (:3)

Any ideas?
Reply
#2
Instead of :3 try 3?
Reply


Forum Jump:

User Panel Messages

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