@@ -2048,24 +2048,21 @@ def to_parquet(self, fname, engine='auto', compression='snappy',
2048
2048
def to_string (self , buf = None , columns = None , col_space = None , header = True ,
2049
2049
index = True , na_rep = 'NaN' , formatters = None , float_format = None ,
2050
2050
sparsify = None , index_names = True , justify = None ,
2051
- line_width = None , max_rows = None , max_cols = None ,
2052
- show_dimensions = False ):
2051
+ max_rows = None , max_cols = None , show_dimensions = False ,
2052
+ decimal = '.' , line_width = None ):
2053
2053
"""
2054
2054
Render a DataFrame to a console-friendly tabular output.
2055
-
2056
2055
%(shared_params)s
2057
2056
line_width : int, optional
2058
2057
Width to wrap a line in characters.
2059
-
2060
2058
%(returns)s
2061
-
2062
2059
See Also
2063
2060
--------
2064
2061
to_html : Convert DataFrame to HTML.
2065
2062
2066
2063
Examples
2067
2064
--------
2068
- >>> d = {'col1' : [1, 2, 3], 'col2' : [4, 5, 6]}
2065
+ >>> d = {'col1': [1, 2, 3], 'col2': [4, 5, 6]}
2069
2066
>>> df = pd.DataFrame(d)
2070
2067
>>> print(df.to_string())
2071
2068
col1 col2
@@ -2081,42 +2078,37 @@ def to_string(self, buf=None, columns=None, col_space=None, header=True,
2081
2078
sparsify = sparsify , justify = justify ,
2082
2079
index_names = index_names ,
2083
2080
header = header , index = index ,
2084
- line_width = line_width ,
2085
2081
max_rows = max_rows ,
2086
2082
max_cols = max_cols ,
2087
- show_dimensions = show_dimensions )
2083
+ show_dimensions = show_dimensions ,
2084
+ decimal = decimal ,
2085
+ line_width = line_width )
2088
2086
formatter .to_string ()
2089
2087
2090
2088
if buf is None :
2091
2089
result = formatter .buf .getvalue ()
2092
2090
return result
2093
2091
2094
- @Substitution (header = 'whether to print column labels, default True' )
2092
+ @Substitution (header = 'Whether to print column labels, default True' )
2095
2093
@Substitution (shared_params = fmt .common_docstring ,
2096
2094
returns = fmt .return_docstring )
2097
2095
def to_html (self , buf = None , columns = None , col_space = None , header = True ,
2098
2096
index = True , na_rep = 'NaN' , formatters = None , float_format = None ,
2099
- sparsify = None , index_names = True , justify = None , bold_rows = True ,
2100
- classes = None , escape = True , max_rows = None , max_cols = None ,
2101
- show_dimensions = False , notebook = False , decimal = '.' ,
2102
- border = None , table_id = None ):
2097
+ sparsify = None , index_names = True , justify = None , max_rows = None ,
2098
+ max_cols = None , show_dimensions = False , decimal = '.' ,
2099
+ bold_rows = True , classes = None , escape = True ,
2100
+ notebook = False , border = None , table_id = None ):
2103
2101
"""
2104
2102
Render a DataFrame as an HTML table.
2105
-
2106
2103
%(shared_params)s
2107
- bold_rows : boolean , default True
2108
- Make the row labels bold in the output
2104
+ bold_rows : bool , default True
2105
+ Make the row labels bold in the output.
2109
2106
classes : str or list or tuple, default None
2110
- CSS class(es) to apply to the resulting html table
2111
- escape : boolean , default True
2107
+ CSS class(es) to apply to the resulting html table.
2108
+ escape : bool , default True
2112
2109
Convert the characters <, >, and & to HTML-safe sequences.
2113
2110
notebook : {True, False}, default False
2114
2111
Whether the generated HTML is for IPython Notebook.
2115
- decimal : string, default '.'
2116
- Character recognized as decimal separator, e.g. ',' in Europe
2117
-
2118
- .. versionadded:: 0.18.0
2119
-
2120
2112
border : int
2121
2113
A ``border=border`` attribute is included in the opening
2122
2114
`<table>` tag. Default ``pd.options.html.border``.
@@ -2127,9 +2119,7 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True,
2127
2119
A css id is included in the opening `<table>` tag if specified.
2128
2120
2129
2121
.. versionadded:: 0.23.0
2130
-
2131
2122
%(returns)s
2132
-
2133
2123
See Also
2134
2124
--------
2135
2125
to_string : Convert DataFrame to a string.
0 commit comments