@@ -247,9 +247,11 @@ def min(self):
247
247
def value_counts (self , normalize = False , sort = True , ascending = False ,
248
248
bins = None , dropna = True ):
249
249
"""
250
- Returns object containing counts of unique values. The resulting object
251
- will be in descending order so that the first element is the most
252
- frequently-occurring element. Excludes NA values.
250
+ Returns object containing counts of unique values.
251
+
252
+ The resulting object will be in descending order so that the
253
+ first element is the most frequently-occurring element.
254
+ Excludes NA values by default.
253
255
254
256
Parameters
255
257
----------
@@ -263,8 +265,8 @@ def value_counts(self, normalize=False, sort=True, ascending=False,
263
265
bins : integer, optional
264
266
Rather than count values, group them into half-open bins,
265
267
a convenience for pd.cut, only works with numeric data
266
- dropna : boolean, default False
267
- Don't include counts of NaN
268
+ dropna : boolean, default True
269
+ Don't include counts of NaN.
268
270
269
271
Returns
270
272
-------
@@ -288,7 +290,14 @@ def unique(self):
288
290
289
291
def nunique (self , dropna = True ):
290
292
"""
291
- Return count of unique elements in the object. Excludes NA values.
293
+ Return number of unique elements in the object.
294
+
295
+ Excludes NA values by default.
296
+
297
+ Parameters
298
+ ----------
299
+ dropna : boolean, default True
300
+ Don't include NaN in the count.
292
301
293
302
Returns
294
303
-------
0 commit comments