【问题标题】:Tableau and R Server for Python适用于 Python 的 Tableau 和 R Server
【发布时间】:2017-10-02 00:07:03
【问题描述】:

我最近发现您可以在 Tableau 中使用 R 来返回 bool、int、long 等。这通过以下方式发生:

install.packages("Rserve")
library(Rserve)
Rserve()
// Should say "Starting RServe..."

然后在 Tableau 中:

// For Tableau under 'Help' > 'Settings and Performance' > 'Manage R Connections'
// Server: 127.0.0.1 and Port:6311
// Make sure that 'RStudio' with 'RServer' is installed and running prior to Tableau connection

但是我想用 Python 做同样的事情,所以 Python 可以用作 Tableau 中的脚本(不在 Python 中使用 Tableau 的 api)——有人知道这是否可能吗?上面的sn-p取自here

【问题讨论】:

  • 您是指将 R 与 Python 结合使用,还是将 Tableau 与 Python 结合使用? R 与 python 你可以使用 pyRserve (或学习熊猫,它可以做 R 做的大部分基本工作)。 Tableau with python,我不认为有一个 API
  • @Inox 我的意思是使用 Python 和 Tableau。有一个 API 供 tableau 在 Python 中使用它。但是似乎没有一种方法可以让您使用 Python 并从 Tableau 作为脚本调用
  • 有一个使用 python 创建 TDE 的 API(几乎不能称之为 API,但还可以)。我的意思是没有 API 可以从 Tableau 调用 python,反之亦然。所以我想答案是否定的,不可能

标签: python r tableau-api


【解决方案1】:

从 Tableau 8.2 开始,没有针对 R 以外的语言的 Script() 调用。

您可以尝试使用 R 作为中间人,通过 rPython 或 RSPython 包调用 Python 函数。不知道它的性能如何,但如果你有一个 R 中不可用的重要 Python 库,这可能是值得的。

【讨论】:

    【解决方案2】:

    从 Tableau-10.1 开始,引入了一个新的包/库,即 TabPy,它的作用类似于 Rserver,用于与 Tableau 的“R”集成。

    这篇文章值得一看:https://www.tableau.com/about/blog/2017/1/building-advanced-analytics-applications-tabpy-64916

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-21
      • 2015-05-08
      • 1970-01-01
      • 2015-11-09
      • 1970-01-01
      • 2014-10-06
      • 2021-11-25
      相关资源
      最近更新 更多