Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
okennedy opened this issue Jan 25, 2024 · 0 comments
Open

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

okennedy opened this issue Jan 25, 2024 · 0 comments
Labels
enhancement New feature or request layer-scala An issue involving Scala compatibility code
Milestone

Comments

@okennedy
Copy link
Contributor

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:

  • First, it requires retaining the artifact, even though we only want to display a fixed (small) number of rows.
  • Second, it is cumbersome and non-obvious.
@okennedy okennedy added enhancement New feature or request layer-scala An issue involving Scala compatibility code labels Jan 25, 2024
@okennedy okennedy added this to the Version 2.1 milestone Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request layer-scala An issue involving Scala compatibility code
Projects
None yet
Development

No branches or pull requests

1 participant