Variable Explorer

The Variable Explorer shows the namespace contents (all global object references, such as variables, functions, modules, etc.) of the currently selected IPython Console session, and allows you to interact with them through a variety of GUI-based editors.

Spyder Variable Explorer, with a list of variables and their contents

Features and editors

Spyder’s Variable Explorer offers built in support for editing lists, strings, dictionaries, NumPy arrays, Pandas DataFrames, and more, and can also histogram, plot, or even display some of them as an RGB image. Several examples of this functionality follow:

Variable Explorer text editor, displaying a long string in a window

Dictionary editor displaying keys and their types, sizes, and values

List editor displaying a list of timedeltas, showing one being edited

Array editor with a 2D int array, displaying a "heatmap" of its values

Variable Explorer with a context menu, including plot/histogram options Plot window showing a histogram, generated via the previous options

Context menu for an int array, with the Show image option selected Plot window showing an interactive image based on the array's data

Supported types

The Variable Explorer has specialized editors for a range of common built-in and third-party Python objects, and can view, edit, and deeply introspect most arbitrary objects via a more general Object explorer. Types with specialized editing support include:

  • Integers

  • Floats

  • Complex numbers

  • Strings

  • datetime dates and Timedelta s

  • Lists

  • Tuples

  • Dictionaries

  • NumPy arrays and matrices

  • Pandas DataFrame, TimeSeries and DatetimeIndex objects

  • PIL/Pillow images

  • Namespaces