doctestprinter.prepare_pandas¶
-
doctestprinter.
prepare_pandas
(frame_or_series: Optional = None, formats: Optional[str] = None, max_line_count: Optional[int] = None, max_title_width: Optional[int] = None) → str¶ Builds explicitly string representations for pandas.DataFrame and pandas.Series objects.
- Parameters
frame_or_series – The DataFrame or Series to be represented.
formats (str; optional) – Concatenated format specifiers for the index column(s) and value column(s). Default {:>f}#{:>f}
max_line_count (int; optional) – Defines the max lines which should be print. Its half wide is used to show either head and tail. Default is 60.
max_title_width (int; optional) – Maximum printed width of the column title. Default is 16.
- Returns
str
Notes
For further details see
print_pandas()
.