+ 1
How to convert this to float. I use Spyder (Python 3.8)
data=self.txtingresodatos.toPlainText() data.plot
10 Answers
+ 7
Luisa , it might be better to show us your complete code. You can put it in playground and link it here. Thanks!
+ 4
Sorry, no chance to help you. I did a try with spyder, where all modules are installed. The code you provided seems to be not complete, and there are files missing e.g. "anomalia.ui".
+ 1
data = float(data) #?
data.plot()
+ 1
data=self.txtingresodatos.toPlainText ()
data=float (data)
data.plot()
0
import sys
from PyQt5 import uic, QtWidgets
#Librerias para manejo de imagenes
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QImage,QPalette,QBrush
from PyQt5.QtCore import QSize
from math import*
#otras librerias
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Nombre de nuestro archivo ui
qtCreatorFile = "anomalia.ui"
Ui_MainWindow,QtBaseClass = uic.loadUiType(qtCreatorFile)
#Clase de la ventana
class VentanaPrincipal(QtWidgets.QMainWindow,Ui_MainWindow):
#Metodo constructor de la clase
def __init__(self):
QtWidgets.QMainWindow.__init__(self)
Ui_MainWindow.__init__(self)
self.setupUi(self)
#Declaramos el Signal -> Objeto pushButton y el Slots-> Metodo
self.btnGraficar.clicked.connect(self.Graficar)
self.btnGuardar.clicked.connect(self.Guardar)
self.btnAnomalia.clicked.connect(self.anomalia)
def Graficar(self):
data = self.txtingresodatos.toPlainText()
0
Hello Lothar this is the code.
0
thanks anomalia.ui is a form
0
is that the problem is in def graph and anomaly because it does not work, when I write the data I will appear Str and rolling.
0
I have tried to correct it several times, but I get the same error.