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