I am new in Oracle and Python and I connected my python to Oracle. I had this table on my Oracle database and I wanted to write a simple query to see my result but it gave me this error:
Input contains NaN, infinity or a value too large for dtype('float64').
My code:
SQL_Query2 = pd.read_sql_query('''select Province_name, cnt from Provincepartnercnt''' , conn)
x_test = pd.DataFrame(SQL_Query2, columns=['Province_name','cnt'])
SQL_Query = pd.read_sql_query('''select Province_name, cnt from Provincepartnercnt''' , conn)
x_train = pd.DataFrame(SQL_Query, columns=['Province_name','cnt'])
myKNN = KNeighborsClassifier(n_neighbors = 1)
myKNN.fit(x_test, x_train)
Also my datatype are not float
: one of my columns is in VARCHAR2(150 BYTE)
and the other one is in NUMBER(38,0)
. Also I have to mention that non of my rows are null or anything else.