Warum diese einfache Konvertierung funktioniert nicht schlägt mir bitte helfen:PYTHON: Einfache Float-Konvertierung funktioniert nicht Warum?
print(getx)
Date
2017-12-08 -4.484884
Name: CCI, dtype: float64
chkccisplt=getx
type(getx)
chksplt=str(getx)
type(chksplt)
print(chksplt)
Date
2017-12-08 -4.484884
Name: CCI, dtype: float64
chkdt,chkcci=chksplt.split(" ")
print(chkdt)
Date
2017-12-08
print(chkcci)
-4.484884
Name: CCI, dtype: float64
chkcci=chkcci.strip()
chkcciflt=float(chkcci)
**ValueError: could not convert string to float: '-4.484884\nName: CCI, dtype:
float64'**
In der letzten Zeile über dem Wert Fehler wird zurückgeworfen. Tausend Dank im Voraus für alle Ihre Antworten.
Fehlermeldung erneut lesen. String ''-4.484884 \ nName: CCI, dtype: float64'' ist nicht korrekt float nummer. – furas