Skip to content

Commit 42d0874

Browse files
committed
using klass for construction
1 parent 9e11b43 commit 42d0874

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

pandas/tests/frame/test_api.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,6 @@ def test_iterrows(self):
214214
exp = self.mixed_frame.loc[k]
215215
self._assert_series_equal(v, exp)
216216

217-
# GH19671
218-
s = DataFrame(
219-
{'non_iso8601': ['M1701', 'M1802', 'M1903', 'M2004'],
220-
'iso8601': date_range('2000-01-01', periods=4, freq='M')})
221-
for k, v in s.iterrows():
222-
exp = s.loc[k]
223-
self._assert_series_equal(v, exp)
224-
225217
def test_itertuples(self):
226218
for i, tup in enumerate(self.frame.itertuples()):
227219
s = self.klass._constructor_sliced(tup[1:])
@@ -512,3 +504,12 @@ def test_tab_complete_warning(self, ip):
512504
with tm.assert_produces_warning(None):
513505
with provisionalcompleter('ignore'):
514506
list(ip.Completer.completions('df.', 1))
507+
508+
def iterrows(self):
509+
# GH19671
510+
s = self.klass(
511+
{'non_iso8601': ['M1701', 'M1802', 'M1903', 'M2004'],
512+
'iso8601': date_range('2000-01-01', periods=4, freq='M')})
513+
for k, v in s.iterrows():
514+
exp = s.loc[k]
515+
self._assert_series_equal(v, exp)

0 commit comments

Comments
 (0)