tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.56k stars 598 forks source link

TabPy Issue Report regards return value #333

Closed nikomataa closed 5 years ago

nikomataa commented 5 years ago
SCRIPT_REAL("
import pandas as pd
import numpy as np

y = np.array(_arg1)

return y.std()
",
SUM([Total Ticket]))

I want to try to show standard deviation value from the measure but got invalid JSON. Can someone explain me how does the tabpy or the script work ? thank you

0golovatyi commented 5 years ago

@nikomataa Have you checked https://github.com/tableau/TabPy/blob/master/docs/TableauConfiguration.md?

nmannheimer commented 5 years ago

@nikomataa if your objective is just to calculate standard deviation, I would also advise using Tableau's native calculations: STDEV() and WINDOW_STDEV()

0golovatyi commented 5 years ago

@nikomataa Do you still experiencing the issue?