@@ -1095,34 +1095,6 @@ def count(self, level=None):
10951095
10961096 return notnull (_values_from_object (self )).sum ()
10971097
1098- def value_counts (self , normalize = False , sort = True , ascending = False ,
1099- bins = None ):
1100- """
1101- Returns Series containing counts of unique values. The resulting Series
1102- will be in descending order so that the first element is the most
1103- frequently-occurring element. Excludes NA values
1104-
1105- Parameters
1106- ----------
1107- normalize : boolean, default False
1108- If True then the Series returned will contain the relative
1109- frequencies of the unique values.
1110- sort : boolean, default True
1111- Sort by values
1112- ascending : boolean, default False
1113- Sort in ascending order
1114- bins : integer, optional
1115- Rather than count values, group them into half-open bins,
1116- a convenience for pd.cut, only works with numeric data
1117-
1118- Returns
1119- -------
1120- counts : Series
1121- """
1122- from pandas .core .algorithms import value_counts
1123- return value_counts (self .values , sort = sort , ascending = ascending ,
1124- normalize = normalize , bins = bins )
1125-
11261098 def mode (self ):
11271099 """Returns the mode(s) of the dataset.
11281100
@@ -1143,27 +1115,6 @@ def mode(self):
11431115 from pandas .core .algorithms import mode
11441116 return mode (self )
11451117
1146- def unique (self ):
1147- """
1148- Return array of unique values in the Series. Significantly faster than
1149- numpy.unique
1150-
1151- Returns
1152- -------
1153- uniques : ndarray
1154- """
1155- return nanops .unique1d (self .values )
1156-
1157- def nunique (self ):
1158- """
1159- Return count of unique elements in the Series
1160-
1161- Returns
1162- -------
1163- nunique : int
1164- """
1165- return len (self .value_counts ())
1166-
11671118 def drop_duplicates (self , take_last = False , inplace = False ):
11681119 """
11691120 Return Series with duplicate values removed
0 commit comments