From cd69f3b04bd42005a181b5c7459de5ec7f2aa572 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 31 Oct 2024 19:09:15 +0100 Subject: diff modifier --- metchart/modifier/diff.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 metchart/modifier/diff.py (limited to 'metchart/modifier/diff.py') diff --git a/metchart/modifier/diff.py b/metchart/modifier/diff.py new file mode 100644 index 0000000..496acf7 --- /dev/null +++ b/metchart/modifier/diff.py @@ -0,0 +1,6 @@ +def run(data, vars): + ret = data[0] + for var in vars: + ret[var['name']] = ret[var['field']].diff(var['by']) + + return ret -- cgit v1.2.3