You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/snowflake/snowpark/modin/plugin/docstrings/dataframe.py
+95Lines changed: 95 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4339,6 +4339,101 @@ def to_records():
4339
4339
Convert ``DataFrame`` to a NumPy record array.
4340
4340
"""
4341
4341
4342
+
defto_string():
4343
+
"""
4344
+
Render a DataFrame to a console-friendly tabular output.
4345
+
4346
+
Parameters
4347
+
----------
4348
+
buf : str, Path or StringIO-like, optional, default None
4349
+
Buffer to write to. If None, the output is returned as a string.
4350
+
4351
+
columns : array-like, optional, default None
4352
+
The subset of columns to write. Writes all columns by default.
4353
+
4354
+
col_space : int, list or dict of int, optional
4355
+
The minimum width of each column. If a list of ints is given every integers corresponds with one column. If a dict is given, the key references the column, while the value defines the space to use..
4356
+
4357
+
header : bool or list of str, optional
4358
+
Write out the column names. If a list of columns is given, it is assumed to be aliases for the column names.
4359
+
4360
+
index : bool, optional, default True
4361
+
Whether to print index (row) labels.
4362
+
4363
+
na_rep : str, optional, default ‘NaN’
4364
+
String representation of NaN to use.
4365
+
4366
+
formatters : list, tuple or dict of one-param. functions, optional
4367
+
Formatter functions to apply to columns’ elements by position or name. The result of each function must be a unicode string. List/tuple must be of length equal to the number of columns.
Formatter function to apply to columns’ elements if they are floats. This function must return a unicode string and will be applied only to the non-NaN elements, with NaN being handled by na_rep.
4371
+
4372
+
sparsify : bool, optional, default True
4373
+
Set to False for a DataFrame with a hierarchical index to print every multiindex key at each row.
4374
+
4375
+
index_names : bool, optional, default True
4376
+
Prints the names of the indexes.
4377
+
4378
+
justify : str, default None
4379
+
How to justify the column labels. If None uses the option from the print configuration (controlled by set_option), ‘right’ out of the box. Valid values are
4380
+
- left
4381
+
- right
4382
+
- center
4383
+
- justify
4384
+
- justify-all
4385
+
- start
4386
+
- end
4387
+
- inherit
4388
+
- match-parent
4389
+
- initial
4390
+
- unset.
4391
+
4392
+
max_rows : int, optional
4393
+
Maximum number of rows to display in the console.
4394
+
4395
+
max_cols : int, optional
4396
+
Maximum number of columns to display in the console.
4397
+
4398
+
show_dimensions : bool, default False
4399
+
Display DataFrame dimensions (number of rows by number of columns).
4400
+
4401
+
decimal : str, default ‘.’
4402
+
Character recognized as decimal separator, e.g. ‘,’ in Europe.
4403
+
4404
+
line_width : int, optional
4405
+
Width to wrap a line in characters.
4406
+
4407
+
min_rows : int, optional
4408
+
The number of rows to display in the console in a truncated repr (when number of rows is above max_rows).
4409
+
4410
+
max_colwidth : int, optional
4411
+
Max width to truncate each column in characters. By default, no limit.
4412
+
4413
+
encoding : str, default “utf-8”
4414
+
Set character encoding.
4415
+
4416
+
Returns
4417
+
-------
4418
+
str or None
4419
+
If buf is None, returns the result as a string. Otherwise returns None.
0 commit comments