We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm getting the following error whenever I set pval=True on a data set. Using Jupyter Notebook via Anaconda running python 3.9
TypeError Traceback (most recent call last) /tmp/ipykernel_2037601/677072381.py in ----> 1 results = TableOne(data = df, columns = columns, groupby = groupby, nonnormal = nonnormal, categorical = categorical,pval=True)
~/anaconda3/lib/python3.9/site-packages/tableone/tableone.py in init(self, data, columns, categorical, groupby, nonnormal, min_max, pval, pval_adjust, htest_name, pval_test_name, htest, isnull, missing, ddof, labels, rename, sort, limit, order, remarks, label_suffix, decimals, smd, overall, row_percent, display_all, dip_test, normal_test, tukey_test) 386 # forgive me jraffa 387 if self._pval: --> 388 self._htest_table = self._create_htest_table(data) 389 390 # correct for multiple testing
~/anaconda3/lib/python3.9/site-packages/tableone/tableone.py in _create_htest_table(self, data) 1113 # if categorical, create contingency table 1114 elif is_categorical: -> 1115 catlevels = sorted(data[v].astype('category').cat.categories) 1116 cross_tab = pd.crosstab(data[self._groupby]. 1117 rename('groupby_var'), data[v])
TypeError: '<' not supported between instances of 'str' and 'int'
The text was updated successfully, but these errors were encountered:
Can anyone help understanding this issue please ? I'm having the same issue.
The values are stratified, and are numeric, I don't understand where this issue is coming from ?
Sorry, something went wrong.
No branches or pull requests
I'm getting the following error whenever I set pval=True on a data set. Using Jupyter Notebook via Anaconda running python 3.9
TypeError Traceback (most recent call last)
/tmp/ipykernel_2037601/677072381.py in
----> 1 results = TableOne(data = df, columns = columns, groupby = groupby, nonnormal = nonnormal, categorical = categorical,pval=True)
~/anaconda3/lib/python3.9/site-packages/tableone/tableone.py in init(self, data, columns, categorical, groupby, nonnormal, min_max, pval, pval_adjust, htest_name, pval_test_name, htest, isnull, missing, ddof, labels, rename, sort, limit, order, remarks, label_suffix, decimals, smd, overall, row_percent, display_all, dip_test, normal_test, tukey_test)
386 # forgive me jraffa
387 if self._pval:
--> 388 self._htest_table = self._create_htest_table(data)
389
390 # correct for multiple testing
~/anaconda3/lib/python3.9/site-packages/tableone/tableone.py in _create_htest_table(self, data)
1113 # if categorical, create contingency table
1114 elif is_categorical:
-> 1115 catlevels = sorted(data[v].astype('category').cat.categories)
1116 cross_tab = pd.crosstab(data[self._groupby].
1117 rename('groupby_var'), data[v])
TypeError: '<' not supported between instances of 'str' and 'int'
The text was updated successfully, but these errors were encountered: