Skip to content

Commit ac17079

Browse files
author
Michael Erickson
committed
Cleaned up doc
1 parent 3043221 commit ac17079

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

swat/cas/table.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3334,9 +3334,9 @@ def nunique(self, dropna=True, casout=None):
33343334
33353335
Returns
33363336
-------
3337-
int
3337+
:class:`pandas.Series`
33383338
If no By groups are specified.
3339-
:class:`pandas .Series`
3339+
:class:`swat.CASResults`
33403340
If By groups are specified.
33413341
33423342
'''
@@ -3351,11 +3351,14 @@ def _nunique(self, skipna=True):
33513351
33523352
Returns
33533353
-------
3354-
:class:`pandas .Series`
3354+
:class:`pandas.Series`
3355+
If By groups are not specified.
3356+
:class:`swat.CASResults`
33553357
If By groups are specified.
33563358
'''
3357-
#If we have a groupby table, we need to consider that
3359+
#If we have a groupby table, we will have multiple tables in our CASResults
33583360
if self.get_groupby_vars():
3361+
#Just return the CASResults object
33593362
return self._retrieve('simple.distinct', includeMissing=not skipna)
33603363
else:
33613364
distinct_table = self._retrieve('simple.distinct', includeMissing=not skipna)['Distinct']
@@ -3365,7 +3368,7 @@ def _nunique(self, skipna=True):
33653368
distinct_table.index.name = None
33663369
distinct_table.name = None
33673370

3368-
return distinct_table
3371+
return distinct_table
33693372

33703373
# def isin(self, values, casout=None):
33713374
# raise NotImplementedError

0 commit comments

Comments
 (0)