Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spyder Python "object arrays are currently not supported"

I have a problem in Anaconda Spyder (Python).

Object type array can not be seen under Windows 10 in the variable explorer. If I click on X or Y, I see an error:

object arrays are currently not supported.

I have Win 10 Home 64bit (i7-4710HQ) and Python 3.5.2 | Anaconda 4.2.0 (64-bit) [MSC v.1900 64 bit (AMD64)]

Screenshot

like image 783
Honza Avatar asked Jan 05 '17 20:01

Honza


2 Answers

A good example is here

import numpy as np import pandas as pd import matplotlib.pyplot as plt dataset = pd.read_csv('Salary_Data.csv') #in your case right name of your file X=dataset.iloc[:,:-1].values   #this will convert dataframe to object df = pd.DataFrame(X) 

You can view data in dataframe this converts arrray to dataframe .

And the variable explorer accepts the dataframe. The above is correct and checked code

like image 76
Aviator Avatar answered Sep 22 '22 13:09

Aviator


(Spyder developer here) Support for object arrays will be added in Spyder 4, to be released in 2019.

like image 27
Carlos Cordoba Avatar answered Sep 20 '22 13:09

Carlos Cordoba