File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,15 @@ def time_from_integer_array(self):
4444 pd .array (self .values_integer , dtype = "Int64" )
4545
4646
47+ class IntervalArray :
48+ def setup (self ):
49+ N = 10_000
50+ self .tuples = [(i , i + 1 ) for i in range (N )]
51+
52+ def time_from_tuples (self ):
53+ pd .arrays .IntervalArray .from_tuples (self .tuples )
54+
55+
4756class StringArray :
4857 def setup (self ):
4958 N = 100_000
Original file line number Diff line number Diff line change @@ -775,6 +775,7 @@ Performance improvements
775775- Performance improvement for :func: `concat ` with extension array backed indexes (:issue: `49128 `, :issue: `49178 `)
776776- Reduce memory usage of :meth: `DataFrame.to_pickle `/:meth: `Series.to_pickle ` when using BZ2 or LZMA (:issue: `49068 `)
777777- Performance improvement for :class: `~arrays.StringArray ` constructor passing a numpy array with type ``np.str_ `` (:issue: `49109 `)
778+ - Performance improvement in :meth: `~arrays.IntervalArray.from_tuples ` (:issue: `50620 `)
778779- Performance improvement in :meth: `~arrays.ArrowExtensionArray.factorize ` (:issue: `49177 `)
779780- Performance improvement in :meth: `~arrays.ArrowExtensionArray.__setitem__ ` when key is a null slice (:issue: `50248 `)
780781- Performance improvement in :class: `~arrays.ArrowExtensionArray ` comparison methods when array contains NA (:issue: `50524 `)
Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ def from_tuples(
608608 left = right = data
609609
610610 for d in data :
611- if isna (d ):
611+ if not isinstance ( d , tuple ) and isna (d ):
612612 lhs = rhs = np .nan
613613 else :
614614 name = cls .__name__
You can’t perform that action at this time.
0 commit comments