如何以干净可读的格式显示 Sparklyr 表,类似于 Databricks 中 display() 的输出?
Databricks 存在内置的 display() 函数(请参阅文档 此处)允许用户以干净且人类可读的方式显示 R 或 SparkR 数据帧,用户可以滚动查看所有列并对列进行排序。请参见下图:
有没有办法在 Databricks 中以这种方式显示从 Sparklyr 输出的表格?显然,我无法直接在 Sparklyr 表上使用函数,因此我尝试在使用 display() 函数之前将 Sparklyr 表转换为 R 数据帧,但遇到了 java.lang.IllegalArgumentException: Invalid type N 错误。
There exist a Databricks’s built-in display() function (see documentation here) which allow users to display R or SparkR dataframe in a clean and human readable manner where user can scroll to see all the columns and perform sorting on the columns. See image below:
Is there a way to display tables that are output from sparklyr in such a manner in Databricks? Obviously I am not able to use function directly on the sparklyr table hence I attempted to convert the sparklyr table into a R dataframe before using display() function but was hit with java.lang.IllegalArgumentException: Invalid type N error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论