Python Forum
Importing Dataset - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: Importing Dataset (/thread-25813.html)



Importing Dataset - PythonGainz - Apr-12-2020

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?


RE: Importing Dataset - jefsummers - Apr-12-2020

Instead of :3 try 3?