A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.databricks.com/aws/en/notebooks/notebook-outputs below:

Notebook outputs and results | Databricks Documentation

Notebook outputs and results

After you attach a notebook to a cluster and run one or more cells, your notebook has state and displays outputs. This section describes how to manage notebook state and outputs.

Clear notebooks state and outputs​

To clear the notebook state and outputs, select one of the Clear options at the bottom of the Run menu.

Results table​

When a cell is run, results are shown in a results table. With the results table, you can do the following:

To view limits on the results table, see Notebook results table limits.

Select data​

To select data in the results table, do any of the following.

To open a side panel displaying selection information, click the panel icon icon in the upper-right corner, next to the Search box.

Copy data to clipboard​

To copy the results table in CSV format to the clipboard, click the downward arrow next to the table title tab, then click Copy results to clipboard.

Alternatively, click the box in the table's top left to select the full table, and then right-click and select Copy from the drop-down menu.

There are several ways to copy selected data:

Sort results​

To sort the results table by the values in a column, hover your cursor over the column name. An icon containing the column name appears at the right of the cell. Click the arrow to sort the column.

To sort by multiple columns, hold down the Shift key as you click the sort arrow for the columns.

Sorting follows natural sort order by default. To enforce a lexicographical sort order, use ORDER BY in SQL or the respective SORT functions available in your environment.

Filter results​

Use filters on a results table to take a closer look at the data. Filters applied to result tables also affect visualizations, enabling interactive exploration without modifying the underlying query or dataset. See Filter a visualization.

There are several ways to create a filter:

Use natural language prompts with Assistant

If you have Databricks Assistant enabled, you can create filters using natural language prompts.

  1. Click at the upper-right of the cell results.
  2. In the dialog that appears, enter text that describes the filter you want.
  3. Click . The Assistant will generate and apply the filter for you.

If you want to create additional filters with Assistant, click next to the filter(s) to enter another prompt.

See Filter data with natural language prompts.

Use the built-in filter dialog

  1. If you don't have Databricks Assistant enabled, click at the upper-right of the cell results to open the filter dialog. You can also access this dialog by clicking .
  2. Select the column you want to filter.
  3. Select the filter rule you want to apply.
  4. Select the value(s) you want to filter.

Filter by a specific value

  1. From the results table, right-click on a cell with that value.
  2. Select Filter by this value from the drop-down menu.

Filter on a specific column

  1. Hover over the column you want to filter on.
  2. Click .
  3. Click Filter.
  4. Select the values you want to filter for.

To temporarily enable or disable a filter, toggle the Enabled/Disabled button in the dialog.

To delete a filter, click next to the filter name .

Apply filters to full dataset​

By default, filters are applied only to the results shown in the results table. If the data returned is truncated (for example, when a query returns more than 10,000 rows or the dataset is larger than 2MB), the filter is applied only to the returned rows. A note in the top right of the table indicates that the filter was applied to truncated data.

You can choose to filter the full dataset instead. Click Truncated data, then choose Full dataset. Depending on the size of the dataset, it may take a long time for the filter to apply.

Create a query from filtered results​

From a filtered results table or visualization in a notebook with SQL as the default language, you can create a new query with the filters applied. In the top right of the table or visualization, click Create query. The query is added as the next cell in the notebook.

The created query applies your filters on top of the original query. This allows you to work with a smaller, more relevant dataset, enabling more efficient data exploration and analysis.

Explore columns​

To facilitate working with tables that have many columns, you can use the column explorer. To open the column explorer, click the column icon () in the top right of a results table.

The column explorer allows you to:

Format columns​

Column headers indicate the data type of the column. For example, indicates integer data type. Hover over the indicator to see the data type.

You can format columns in results tables as types like Currency, Percentage, URL and more, with control over decimal places for clearer tables.

Format columns from the kebab menu in the column name.

Download results​

By default, downloading results is enabled. To toggle this setting, see Manage the ability to download results from notebooks.

You can download a cell result that contains tabular output to your local machine. Click the downward pointing arrow next to the tab title. The menu options depend on the number of rows in the result and the Databricks Runtime version. Downloaded results are saved on your local machine as a CSV file with a name corresponding to your notebook name.

For notebooks connected to SQL warehouses or serverless compute, you can also download the results as an Excel file.

Explore SQL cell results​

In a Databricks notebook, results from a SQL language cell are automatically available as a DataFrame assigned to the variable _sqldf. You can use the _sqldf variable to refer to the previous SQL output in subsequent Python and SQL cells. For details, see Explore SQL cell results.

View multiple outputs per cell​

Python notebooks and %python cells in non-Python notebooks support multiple outputs per cell. For example, the output of the following code includes both the plot and the table:

Python

import pandas as pd
from sklearn.datasets import load_iris

data = load_iris()
iris = pd.DataFrame(data=data.data, columns=data.feature_names)
ax = iris.plot()
print("plot")
display(ax)
print("data")
display(iris)
Resize outputs​

Resize cell outputs by dragging the bottom right corner of the table or visualization.

Commit notebook outputs in Databricks Git folders​

To learn about committing .ipynb notebook outputs, see Allow committing .ipynb notebook output.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4