Work with outputs
When you execute a code cell, its output is shown below. You can save the results or clear the output.
You can manage the length of the notebook by expanding and collapsing cell outputs.
Expand or collapse cell outputs
Click the blue border in the gutter next to the cell output.
Disable scrolling in output cells
Right-click the output cell.
Deselect the Scrolling for Outputs option. The entire output will be displayed without limiting the number of lines.
Work with plots
Save a plot as an image
Right-click the output and select Save As from the context menu.
If you are using a dark UI theme, the colors in charts are adapted for better readability by default. To change this behavior, perform the following steps:
Disable color inversion in plots
Press Ctrl+Alt+S to open settings and then select
.Disable the Invert image outputs for dark themes checkbox.
Restart the editor to apply the changes.
Resize plots
Move the mouse pointer to the bottom of the cell, so that the pointer becomes a double arrow.
Click and drag the cell border up or down to reach the required size.
Dataframes and series can be displayed in tabular or graphical form. By default, tables are shown. To toggle the view mode, use the corresponding icons in the upper left corner.
Work with tables
To open the table in the Data View tool window, click Open in Data View in the upper-right corner of the table.
Save data as a file
Click Export Data to File.
Choose an extractor and configure additional settings.
Click Browse to choose the location for your file.
Click Export to File to save the data as a file.
Sort data
To sort the table data based on the column values, you can either click the column name or select Ascending or Descending from the ORDER BY section in the context menu.
To add another column to sorting, you can either click the column name while pressing Alt or select Ascending or Descending from the Add to ORDER BY section in the context menu.
The data will be sorted by selected columns.
State
Description
Indicates that the data is not sorted in this column. The initial state of the sorting marker.
The data is sorted in the ascending order.
The data is sorted in the descending order.
The number to the right of the marker (1 on the picture) is the sorting level. You can sort by more than one column. In such cases, different columns will have different sorting levels.
Filter data
Click Open Filter View in the upper-right corner of the table.
In the dialog that opens, select the column where you want to apply the filter and specify the filter criteria.
If you want to use additional filters, click Add filter and specify the new filter criteria.
Click Apply to filter data.
To remove or duplicate a filter, click Additional Filter Actions and select the required option from the list.
Adjust table formatting
Click More Actions and select Format Table...
In the dialog that opens, specify the format and click OK.
PyCharm supports Python 2 formatting syntax.
Use Expression Input
You can use Expression Input to display multidimensional data in a two-dimensional table format.
Click More Actions and select Show Expression Input.
Write your expression in the input field that appears on top of the table and press Enter.
View column statistics
By default, column statistics are turned off.
To change the default mode to Compact or Detailed, navigate to .
The Compact mode includes only Missing
and Count
statistics:
For numeric data, histograms are plotted and shown together with statistics. Hover over the histogram to view detailed information about each bar.
To view detailed column statistics, do one of the following:
Hover over a column name. A popup with column statistics appears.
Click Show Column Statistics and select Detailed.
The detailed statistics are shown above the columns.
- Data type
Shows the data type the column belongs to
- Missing
Shows the number of
None
values in the column- Count
Shows the total number of items in a column
- Distinct
Shows the number of unique values
- Top
Shows the most popular value
- Frequency
Shows the number of times an element occurs
- Data type
Shows the data type the column belongs to
- Missing
Shows the number of
None
values in the column- Count
Shows the total number of items in a column
- Mean
Shows the average number of all values in the column
- Std. Deviation
Shows the standard deviation value
- Min
Shows the minimum value in the column
- Pctl
Shows values for 5th, 25th, 50th( Median) and 95th percentiles
- Max
Shows the maximum value in the column
Work with charts
To view dataframes or series in a graphical form, click Show Chart.
The data will be displayed in the form of a chart. You can change the type of chart and configure additional settings.
Configure charts
Click Show series settings to change the initial settings of the chart.
Select the chart type and configure the settings. You can choose one of the following chart types:
Bar
Pie
Area
Line
Scatter
Bubble
Stock
AreaRange
Histogram
Click the Add new series link to add more series to the chart.
Save a chart as an image
Click Export to PNG to save the generated chart in the .png format.
Enter the filename and click Save.