Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #5492
| From | eilfh <eilfh156@posteo.de> |
|---|---|
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel |
| Date | 2019-06-18 22:53 +0200 |
| Organization | eilfh |
| Message-ID | <mailman.147.1560891786.21674.python-de@python.org> (permalink) |
| References | <1825444.o0KX4FVeTt@host> <A873B342-4C42-4F2A-924F-1B8DA32A6488@wodca.de> <2735687.t9uVyT51e0@host> |
Am Dienstag, 18. Juni 2019, 09:09:39 CEST schrieb Achim Herwig:
> for i in range(spalte_nr):
> for j in range(spalte_nr):
danke fürs mitdenken
nach euren Hinweisen und weiteren vielen "Versuchen"
(alles mit pandas,
in Zeile/Spalte 0 stehen jeweils die Beschreibungen)
zeilen_anzahl = len(df.index)
spalten_anzahl = len(df.columns)
spalten_mittel = df.mean()
zeilen_mittel = df.mean(axis = 1)
df1 = df
for i in range(1, spalten_anzahl + 1):
for j in range(1, zeilen_anzahl + 1):
df1.iloc[j - 1, i - 1] = df1.iloc[j -1 , i - 1]
- spalten_mittel[i - 1]
- zeilen_mittel[j - 1]
+ ges_mittel
.... sicher nicht die eleganteste Lösung,
aber es komm das 'raus, was ich suche
Danke
Frank
Back to de.comp.lang.python | Previous | Next | Find similar
Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel eilfh <eilfh156@posteo.de> - 2019-06-18 22:53 +0200
csiph-web