Viewing as Array or DataFrame
This command is available for:
Hence, NumPy and/or pandas must be downloaded and installed in your Python interpreter.
Viewing as array or DataFrame
To use the command View as Array/View as DataFrame, follow these steps:
To view as array from the Python Console, follow these steps:
- Launch the Python Console.
- Execute a Python code, for example:
import pandas as pd import numpy as np array = np.random.random((36, 36)) array1 = np.random.random((36, 10)) df = pd.DataFrame(array) df2 = pd.DataFrame(array1) print("Put breakpoint here") df = 1 print("The End")
- In the toolbar of the console, click . The variables declared in the console, appear to the right.
- Do one of the following:
Actions available via the Data View tool window
In the Data View tool window, one can do the following:
- Change the format of presentation. For example, if in the Format field one specifies
%.5f, then 5 digits will appear after dot; if one specifies
%.2f, the presentation of the data will change to showing 2 digits after dot. See Python documentation for details.
- Close the viewer tab by clicking , and open a new one by clicking .
- Make the presentation black-and-white in the new tabs by clearing the check-command Colored by Default that appears in the drop-down menu . If this command is cleared, and a new DataFrame/array is opened, then the new presentation will be colorless.
- It's possible to change from the colored to colorless modes for the current tab by right-clicking a tab and selecting the check-command Colored:
- Resize columns using the double-headed arrow :
Data View is a tool window, and as such, it inherits all the behaviors that are common to all the tool windows. Refer to the section PyCharm Tool Windows to learn more.