Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #5492

Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel

Path csiph.com!weretis.net!feeder7.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!not-for-mail
From eilfh <eilfh156@posteo.de>
Newsgroups de.comp.lang.python
Subject Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel
Date Tue, 18 Jun 2019 22:53:25 +0200
Organization eilfh
Lines 36
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>
Mime-Version 1.0
Content-Type text/plain; charset="iso-8859-1"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de WO30ftWBGfuJkDMK1NxwYQWF2Jb8ryrJM/hsquGwtmpg==
Return-Path <eilfh156@posteo.de>
X-Original-To python-de@python.org
Delivered-To python-de@mail.python.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1560891215; bh=z7QftLL6IFpjW5ZTFnUnA7yCHSBtBh0+XUf29KNllJ4=; h=From:To:Subject:Date:From; b=XdIaXZbE6lJjmFtzhn9+gf23bI72Vsn3vi8cLMRQ50XY5u4ZhtXTPlPU+DHKfLf6H 3zKDWeuC8y8i9ibCAiNh/fw25aG5qkb3/7kNGkD14Vi3Si/IHMUU2Rfrp5sWmtmciq C39Y5pYIBscpsjeOQdEub8p2ki0VZRuPmBfIZh4PPOkdRrIpgpXiCNw/ITF9sYzoJo mVTeACNguYaauuzA1cTHnLGeH38S31LSSs5/Gf4Fc9vrQWcMyaP1vF+7w7qNc4/xN7 c9je5lP43CA27XUOCvhNLd1GF/pfeo5g6uK5ENwX+X/RoWijC8lxKDRF9eIVry/1c6 +V+9cvALYd+6w==
In-Reply-To <A873B342-4C42-4F2A-924F-1B8DA32A6488@wodca.de>
X-BeenThere python-de@python.org
X-Mailman-Version 2.1.29
Precedence list
List-Id Die Deutsche Python Mailingliste <python-de.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-de>, <mailto:python-de-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-de/>
List-Post <mailto:python-de@python.org>
List-Help <mailto:python-de-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-de>, <mailto:python-de-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <2735687.t9uVyT51e0@host>
X-Mailman-Original-References <1825444.o0KX4FVeTt@host> <A873B342-4C42-4F2A-924F-1B8DA32A6488@wodca.de>
Xref csiph.com de.comp.lang.python:5492

Show key headers only | View raw


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


Thread

Re: [Python-de] Anfaengerfrage: Dataframe - Zeilenmittel - Spaltenmittel eilfh <eilfh156@posteo.de> - 2019-06-18 22:53 +0200

csiph-web