VizierDB / vizier-scala

The Vizier kernel-free notebook programming environment
Other
34 stars 11 forks source link

Add an analog for df.show() to scala cells #303

Open okennedy opened 7 months ago

okennedy commented 7 months ago

What pain point is this feature intended to address? Please describe. When writing scala code cells, it's occasionally useful, when debugging, to display a sample of a generated dataset (i.e., what one would do with df.show() at the terminal).

Describe the solution you'd like A vizierdb.show(df:DataFrame) that displays the first N rows of the dataframe as a normal dataset.

Bonus points if we can override .show() to have this behavior.

Extra bonus points if we can figure out the name of the dataframe variable and use that as the dataset name.

Describe alternatives you've considered The current workaround is:

vizierdb.outputDataframe("some_name_here", df)
vizierdb.displayDataset("some_name_here")

This has two main drawbacks: