Skip to content

Commit 9c4c8ee

Browse files
author
Kevin D Smith
committed
Make sure only data columns are returned in corr; Newer versions of CAS return missing value info
1 parent 5221333 commit 9c4c8ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swat/cas/table.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,9 @@ def corr(self, method=None, min_periods=None):
28782878
out = tbl._retrieve('simple.correlation', simple=False)['Correlation']
28792879
out.set_index('Variable', inplace=True)
28802880
out.index.name = None
2881-
return out
2881+
# Newer versions of the CAS server return extra columns
2882+
# containing missing value information.
2883+
return out[tbl.columns]
28822884

28832885
# def corrwith(self, other, axis=None, drop=None):
28842886
# raise NotImplementedError

0 commit comments

Comments
 (0)