Skip to content

Commit

Permalink
update tests/parser
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 committed Nov 22, 2018
1 parent dea13b2 commit ae3877b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pandas/tests/io/parser/test_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def test_header_multi_index_common_format_malformed1(all_parsers):
columns=MultiIndex(levels=[[u("a"), u("b"), u("c")],
[u("r"), u("s"), u("t"),
u("u"), u("v")]],
labels=[[0, 0, 1, 2, 2], [0, 1, 2, 3, 4]],
codes=[[0, 0, 1, 2, 2], [0, 1, 2, 3, 4]],
names=[u("a"), u("q")]))
data = """a,a,a,b,c,c
q,r,s,t,u,v
Expand All @@ -255,7 +255,7 @@ def test_header_multi_index_common_format_malformed2(all_parsers):
columns=MultiIndex(levels=[[u("a"), u("b"), u("c")],
[u("r"), u("s"), u("t"),
u("u"), u("v")]],
labels=[[0, 0, 1, 2, 2], [0, 1, 2, 3, 4]],
codes=[[0, 0, 1, 2, 2], [0, 1, 2, 3, 4]],
names=[None, u("q")]))

data = """,a,a,b,c,c
Expand All @@ -272,10 +272,10 @@ def test_header_multi_index_common_format_malformed3(all_parsers):
expected = DataFrame(np.array(
[[3, 4, 5, 6], [9, 10, 11, 12]], dtype="int64"),
index=MultiIndex(levels=[[1, 7], [2, 8]],
labels=[[0, 1], [0, 1]]),
codes=[[0, 1], [0, 1]]),
columns=MultiIndex(levels=[[u("a"), u("b"), u("c")],
[u("s"), u("t"), u("u"), u("v")]],
labels=[[0, 1, 2, 2], [0, 1, 2, 3]],
codes=[[0, 1, 2, 2], [0, 1, 2, 3]],
names=[None, u("q")]))
data = """,a,a,b,c,c
q,r,s,t,u,v
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/parser/test_index_col.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,5 @@ def test_multi_index_naming_not_all_at_beginning(all_parsers):
expected = DataFrame({"Unnamed: 2": ["c", "d", "c", "d"]},
index=MultiIndex(
levels=[['a', 'b'], [1, 2, 3, 4]],
labels=[[0, 0, 1, 1], [0, 1, 2, 3]]))
codes=[[0, 0, 1, 1], [0, 1, 2, 3]]))
tm.assert_frame_equal(result, expected)

0 comments on commit ae3877b

Please sign in to comment.