Code: Alles auswählen
0 -12.0
1 -3.0
2 -25.0
dtype: float64
1 -3.0
2 -25.0
3 -8.0
dtype: float64
2 -25.0
3 -8.0
4 0.0
dtype: float64
3 -8.0
4 0.0
5 3.0
dtype: float64
4 0.0
5 3.0
6 -16.0
dtype: float64
Code: Alles auswählen
print(data[0]) # -> KeyError: 0
print(data["Temperatur"][0] # -> KeyError: 'Temperatur'
print(data[0]["Temperatur"] # -> IndexError: invalid index to scalar variable.
print(data.iloc(0))
print(data.iloc(1)) # -> ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'>
print(data["Temperatur"].iloc(0)) # -> KeyError: 'Temperatur'
print(data.iloc(0)["Temperatur"]) # -> TypeError: Cannot index by location index with a non-integer key
Wenn das eine größere Baustelle ist/wird, wie schafft man es mit einer for Schleife in Python schnell über eine Liste mit 20.000 Einträgen zu iterieren?
Dann werfe ich einfach das pandas raus und gut ists.