[Darshan-commits] [Git][darshan/darshan][autoperf-mod-update] Fix python handling for dictionary and pandas records modes

Kevin Harms xgitlab at cels.anl.gov
Wed Jan 13 21:59:01 CST 2021



Kevin Harms pushed to branch autoperf-mod-update at darshan / darshan


Commits:
ae66fba5 by Kevin Harms at 2021-01-14T03:58:49+00:00
Fix python handling for dictionary and pandas records modes

- - - - -


1 changed file:

- darshan-util/pydarshan/darshan/backend/cffi_backend.py


Changes:

=====================================
darshan-util/pydarshan/darshan/backend/cffi_backend.py
=====================================
@@ -345,13 +345,11 @@ def log_get_generic_record(log, mod_name, mod_type, mode='numpy'):
     fcdict = dict(zip(fcounter_names(mod_name), rec['fcounters']))
 
     if mode == "dict":
-        rec = {'counters': cdict, 'fcounter': fcdict}
-
-    if mode == "pandas":
-        rec = {
-                'counters': pd.DataFrame(cdict, index=[0]),
-                'fcounters': pd.DataFrame(fcdict, index=[0])
-                }
+        rec['counters'] = cdict
+        rec['fcounters'] = fcdict
+    elif mode == "pandas":
+        rec['counters'] = pd.DataFrame(cdict, index=[0])
+        rec['fcounters'] = pd.DataFrame(fcdict, index=[0])
 
     return rec
 



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/ae66fba5cc8182c370dbb1b8d73df5d8630d6187

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/commit/ae66fba5cc8182c370dbb1b8d73df5d8630d6187
You're receiving this email because of your account on xgitlab.cels.anl.gov.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20210113/fdb711e9/attachment.html>


More information about the Darshan-commits mailing list