Skip to content

Commit 323839f

Browse files
authored
Remove redundant lists in array.py (pandas-dev#34847)
1 parent 16127d8 commit 323839f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/tests/extension/json/array.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,11 @@ def astype(self, dtype, copy=True):
179179
def unique(self):
180180
# Parent method doesn't work since np.array will try to infer
181181
# a 2-dim object.
182-
return type(self)(
183-
[dict(x) for x in list({tuple(d.items()) for d in self.data})]
184-
)
182+
return type(self)([dict(x) for x in {tuple(d.items()) for d in self.data}])
185183

186184
@classmethod
187185
def _concat_same_type(cls, to_concat):
188-
data = list(itertools.chain.from_iterable([x.data for x in to_concat]))
186+
data = list(itertools.chain.from_iterable(x.data for x in to_concat))
189187
return cls(data)
190188

191189
def _values_for_factorize(self):

0 commit comments

Comments
 (0)