I use pandas' to_html to generate output file, when data are written to the file they have many digits after the decimal point. The pandas' to_html float_format method can limit the digits, but when I used 'float_format' as below:
DataFormat.to_html(header=True,index=False,na_rep='NaN',float_format='%10.2f')
it raise a exception:
typeError: 'str' object is not callable
how to solve this problem?