Skip to content

Commit 08ab4bd

Browse files
committed
sof_perf_analyzer: fix float_format not callable error
Fix float_format string passed to pandas to_csv() and to_html() to be a callable object resolving 'TypeError: 'str' object is not callable' observed with pandas==2.1.4 Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
1 parent b5e7bc2 commit 08ab4bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/sof_perf_analyzer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ def print_perf_info():
263263
print(stats)
264264

265265
if args.out2csv is not None:
266-
stats.to_csv(args.out2csv, sep=',', float_format='%.3f', index=False)
266+
stats.to_csv(args.out2csv, sep=',', float_format='{:.3f}'.format, index=False)
267267

268268
if args.out2html is not None:
269-
stats.to_html(args.out2html, float_format='%.3f', index=False)
269+
stats.to_html(args.out2html, float_format='{:.3f}'.format, index=False)
270270

271271
def parse_args():
272272
'''Parse command line arguments'''

0 commit comments

Comments
 (0)