Skip to content

Commit

Permalink
Fix empty csv
Browse files Browse the repository at this point in the history
Python 3.12 in its latest version has a different way to iterate over a
dictionnary...

Seriously???
  • Loading branch information
tbarbette committed Nov 14, 2024
1 parent 91493fd commit bda059d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions npf/grapher.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,10 @@ def graph(self, filename, options, fileprefix=None, graph_variables: List[Run] =
if options.pandas_filename is not None or options.web is not None or options.notebook_path is not None:
all_results_df=pd.DataFrame() # Empty dataframe
for test, build, all_results in series:
for i, (x) in enumerate(all_results):
if len(x) == 0:
for i, (x,results) in enumerate(all_results.items()):
if len(results) == 0:
continue
try:

labels = [k[1] if type(k) is tuple else k for k,v in x.variables.items()]
x_vars = [[(v[1] if type(v) is tuple else v) for k,v in x.variables.items()]]
x_vars=pd.DataFrame(x_vars,index=[0],columns=labels)
Expand Down

0 comments on commit bda059d

Please sign in to comment.