Plot
API
This method is used to plot a Spark DataFrame, the specifics of which are determined by thedesc
parameter. If desc
is not provided, the method will try to plot the DataFrame based on its schema.
- param desc: An optional natural language string that outlines the specific transformation to be applied on the DataFrame.
- param cache: If
True
, fetches cached data, if available. IfFalse
, retrieves fresh data and updates cache. - return: Returns the generated code as a string. If the generated code is not valid Python code, an empty string is returned.
Example
Given a DataFrame auto_df
from Data Ingestion, you can plot it with the following code:
To plot with an instruction: