Skip to content

Commit 3572626

Browse files
committed
Rebase and some followup
1 parent 8188319 commit 3572626

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

asv_bench/benchmarks/frame_ctor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def setup(self, offset, n_steps):
132132
offset = getattr(offsets, offset)
133133
self.idx = get_index_for_offset(offset(n_steps, **kwargs))
134134
self.df = DataFrame(np.random.randn(len(self.idx), 10), index=self.idx)
135-
self.d = dict((col, self.df[col]) for col in self.df.columns)
135+
self.d = dict(self.df.items())
136136

137137
def time_frame_ctor(self, offset, n_steps):
138138
DataFrame(self.d)

asv_bench/benchmarks/io_bench.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class read_json_lines(object):
202202
def setup(self):
203203
self.N = 100000
204204
self.C = 5
205-
self.df = DataFrame(dict(('float{0}'.format(i), randn(self.N)) for i in range(self.C)))
205+
self.df = DataFrame({('float{0}'.format(i), randn(self.N)) for i in range(self.C)})
206206
self.df.to_json(self.fname,orient="records",lines=True)
207207

208208
def teardown(self):

pandas/core/indexes/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def conv(i):
101101

102102

103103
def _sanitize_and_check(indexes):
104-
kinds = list(set(type(index) for index in indexes))
104+
kinds = list({type(index) for index in indexes})
105105

106106
if list in kinds:
107107
if len(kinds) > 1:

pandas/core/internals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def __unicode__(self):
241241

242242
else:
243243

244-
shape = ' x '.join([pprint_thing(s) for s in self.shape])
244+
shape = ' x '.join(pprint_thing(s) for s in self.shape)
245245
result = '{name}: {index}, {shape}, dtype: {dtype}'.format(
246246
name=name, index=pprint_thing(self.mgr_locs.indexer),
247247
shape=shape, dtype=self.dtype)

0 commit comments

Comments
 (0)