tabpy

Tableau error “All Fields must be aggregate or constant” when invoking TabPy SCRIPT_REAL

主宰稳场 提交于 2020-02-23 08:17:08
问题 I am calling a TabPy server via a calculated field in a Tableau worksheet to run a hypothesis test: does the rate of Bookings vary significantly by Group? I have a table such as: Group Bookings 0 A 1 1 A 0 3998 B 1 3999 B 0 In Python, on the same server (using the python 2.7 docker image) the test I want is simply: from scipy.stats import fisher_exact df_cont_tbl = pd.crosstab(df['Group'], df['Bookings']) prop_test = fisher_exact(df_cont_tbl) print 'Fisher exact test: Odds ratio = {:.2f}, p