Python Forum
Spyder: ndarray object of numpy module error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spyder: ndarray object of numpy module error
#7
dataset = pd.read_csv('50_Startups.csv')
X = dataset.iloc[:, :-1]
Y = dataset.iloc[:, 4]

=> Remove .values and it will work
=> But this will just create a dataframe of those datasets and not objects so choose wisely
Reply


Messages In This Thread
RE: Spyder: ndarray object of numpy module error - by rohit_w - Jul-31-2019, 06:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Singular error with numpy.linalg.inv LennartLindner 1 10,859 Oct-04-2020, 05:15 AM
Last Post: scidam
  Integer object error Zatoichi 2 3,725 Feb-18-2018, 07:25 AM
Last Post: Zatoichi
  Saving an numpy.ndarray as .ply file in python Tina 4 17,080 Oct-11-2017, 06:08 PM
Last Post: Tina
  error 'ring' is not a callable object JakeWitten 1 3,052 May-02-2017, 05:09 AM
Last Post: nilamo

Forum Jump:

User Panel Messages

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