print options

User 5179 | 7/15/2016, 1:39:59 PM

Is there similar options as pandas pd.set_option() in graphlab?


User 5371 | 7/16/2016, 4:33:56 PM

Hi Demir,

You can use printrows on SFrame to control how it is printed. Here is the docstring for SFrame.printrows:

In [50]: sf.print_rows?
Signature: sf.print_rows(num_rows=10, num_columns=40, max_column_width=30, max_row_width=80, output_file=None)
Print the first M rows and N columns of the SFrame in human readable

num_rows : int, optional
    Number of rows to print.

num_columns : int, optional
    Number of columns to print.

max_column_width : int, optional
    Maximum width of a column. Columns use fewer characters if possible.

max_row_width : int, optional
    Maximum width of a printed row. Columns beyond this width wrap to a
    new line. `max_row_width` is automatically reset to be the
    larger of itself and `max_column_width`.

output_file: file, optional
    The stream or file that receives the output. By default the output
    goes to sys.stdout, but it can also be redirected to a file or a
    string (using an object of type StringIO).

Hope that helps!

User 5179 | 7/19/2016, 7:34:36 AM

Thanks @Ping , I am aware of print_rows, but I was wondering if there is another way :)