Skip to content

Commit 186491f

Browse files
committed
Merge pull request #6054 from shoyer/test-DataFrame.to_latex
DOC: Clarify that DataFrame string formatters must return strings
2 parents cab2a93 + bfa8eff commit 186491f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/core/format.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
string representation of NAN to use, default 'NaN'
4444
formatters : list or dict of one-parameter functions, optional
4545
formatter functions to apply to columns' elements by position or name,
46-
default None, if the result is a string , it must be a unicode
47-
string. List must be of length equal to the number of columns.
46+
default None. The result of each function must be a unicode string.
47+
List must be of length equal to the number of columns.
4848
float_format : one-parameter function, optional
49-
formatter function to apply to columns' elements if they are floats
50-
default None
49+
formatter function to apply to columns' elements if they are floats,
50+
default None. The result of this function must be a unicode string.
5151
sparsify : bool, optional
5252
Set to False for a DataFrame with a hierarchical index to print every
5353
multiindex key at each row, default True

0 commit comments

Comments
 (0)