Code Interpreter / Result
Interface: Result
Represents the data to be displayed as a result of executing a cell in a Jupyter notebook. The result is similar to the structure returned by ipython kernel: https://ipython.readthedocs.io/en/stable/development/execution.html#execution-semantics
The result can contain multiple types of data, such as text, images, plots, etc. Each type of data is represented as a string, and the result can contain multiple types of data. The display calls don't have to have text representation, for the actual result the representation is always present for the result, the other representations are always optional.
Properties
chart?
readonlyoptionalchart?:ChartTypes
Contains the chart data.
data?
readonlyoptionaldata?:Record<string,unknown>
Contains the data from DataFrame.
extra?
readonlyoptionalextra?:any
Extra data that can be included. Not part of the standard types.
html?
readonlyoptionalhtml?:string
HTML representation of the data.
isMainResult
readonlyisMainResult:boolean
javascript?
readonlyoptionaljavascript?:string
JavaScript representation of the data.
jpeg?
readonlyoptionaljpeg?:string
JPEG representation of the data.
json?
readonlyoptionaljson?:string
JSON representation of the data.
latex?
readonlyoptionallatex?:string
LaTeX representation of the data.
markdown?
readonlyoptionalmarkdown?:string
Markdown representation of the data.
pdf?
readonlyoptionalpdf?:string
PDF representation of the data.
png?
readonlyoptionalpng?:string
PNG representation of the data.
raw
readonlyraw:RawData
svg?
readonlyoptionalsvg?:string
SVG representation of the data.
text?
readonlyoptionaltext?:string
Text representation of the result.
Methods
formats()
formats():
string[]
Returns all the formats available for the result.
Returns
string[]
Array of strings representing the formats available for the result.
toJSON()
toJSON():
object
Returns the serializable representation of the result.
Returns
object
extra?
optionalextra?:any
html
html:
string|undefined
javascript
javascript:
string|undefined
jpeg
jpeg:
string|undefined
json
json:
string|undefined
latex
latex:
string|undefined
markdown
markdown:
string|undefined
pdf
pdf:
string|undefined
png
png:
string|undefined
svg
svg:
string|undefined
text
text:
string|undefined