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


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

[Python-de] Wie Key-Value Sets speichern?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Florian Lindner <mailinglists@xgm.de>
Newsgroups de.comp.lang.python
Subject [Python-de] Wie Key-Value Sets speichern?
Date Wed, 28 Sep 2016 00:09:13 +0200
Lines 30
Message-ID <mailman.47.1475014654.2302.python-de@python.org> (permalink)
References <5451e46e-5eca-e89d-61ef-2030e6aee36e@xgm.de>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Trace news.uni-berlin.de WlZ071dteHjyDHiT9N8PdwA+/4iDbVyZSN5irkZWR5aw==
Return-Path <mailinglists@xgm.de>
X-Original-To python-de@python.org
Delivered-To python-de@mail.python.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0
X-BeenThere python-de@python.org
X-Mailman-Version 2.1.23
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 <5451e46e-5eca-e89d-61ef-2030e6aee36e@xgm.de>
Xref csiph.com de.comp.lang.python:4545

Show key headers only | View raw


Hallo,

ich schreibe Werte aus einer C++ Anwendung, gespeichert als std::map<string, T> in eine Datei.

Dabei will ich folgendes:

- Die Datei soll menschen-lesbar sein

- Es sollen mehrere Sets von Key-Value Paaren gespeichert werden, z.B. eins pro Run.

- Die Paar varieren pro Set. CSV scheidet deshalb aus, da es es für die gesamte Datei das gleiche Datenformat annimmt
(wenn man die erste Zeile als Header, für die Keys verwendet)

- Eingelesen werden soll es mit Python um dann z.B. mit numpy weiterverarbeitet werden.

Wie würde nun ein geeignetes Datenformat ausschauen, was ich dann auch problemlos mit Python einlesen kann?

CSV mit Trennlinie?

A;B;C
AValue;BValue;CValue
=====
A;D;Y
AVal,DVal,YVal
=====
...


Viele Grüße,
Florian

Back to de.comp.lang.python | Previous | Next | Find similar


Thread

[Python-de] Wie Key-Value Sets speichern? Florian Lindner <mailinglists@xgm.de> - 2016-09-28 00:09 +0200

csiph-web