File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ def setup(self):
4747 self .values_all_nan = [np .nan ] * len (self .values )
4848 self .values_all_int8 = np .ones (N , 'int8' )
4949 self .categorical = pd .Categorical (self .values , self .categories )
50+ self .series = pd .Series (self .categorical )
5051
5152 def time_regular (self ):
5253 pd .Categorical (self .values , self .categories )
@@ -72,6 +73,9 @@ def time_from_codes_all_int8(self):
7273 def time_existing_categorical (self ):
7374 pd .Categorical (self .categorical )
7475
76+ def time_existing_series (self ):
77+ pd .Categorical (self .series )
78+
7579
7680class ValueCounts (object ):
7781
Original file line number Diff line number Diff line change @@ -1150,7 +1150,7 @@ Performance Improvements
11501150- Improved performance of :func: `pd.concat ` for `Series ` objects (:issue: `23404 `)
11511151- Improved performance of :meth: `DatetimeIndex.normalize ` and :meth: `Timestamp.normalize ` for timezone naive or UTC datetimes (:issue: `23634 `)
11521152- Improved performance of :meth: `DatetimeIndex.tz_localize ` and various ``DatetimeIndex `` attributes with dateutil UTC timezone (:issue: `23772 `)
1153- - Improved performance of :meth : `Categorical.__init__ ` (:issue: `23814 `)
1153+ - Improved performance of :class : `Categorical ` constructor for ` Series ` objects (:issue: `23814 `)
11541154
11551155.. _whatsnew_0240.docs :
11561156
You can’t perform that action at this time.
0 commit comments