Skip to content

Automatic PR for aeaeffcb-81b3-4b68-9f9e-4c529b95484a #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: aeaeffcb-81b3-4b68-9f9e-4c529b95484a-base
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions pandas/tests/test_multilevel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import datetime

import numpy as np
import pytest

Expand Down Expand Up @@ -268,28 +266,6 @@ def test_subsets_multiindex_dtype(self):
result = df.a.b.dtypes
tm.assert_series_equal(result, expected)

def test_datetime_object_multiindex(self):
data_dic = {
(0, datetime.date(2018, 3, 3)): {"A": 1, "B": 10},
(0, datetime.date(2018, 3, 4)): {"A": 2, "B": 11},
(1, datetime.date(2018, 3, 3)): {"A": 3, "B": 12},
(1, datetime.date(2018, 3, 4)): {"A": 4, "B": 13},
}
result = DataFrame.from_dict(data_dic, orient="index")
data = {"A": [1, 2, 3, 4], "B": [10, 11, 12, 13]}
index = [
[0, 0, 1, 1],
[
datetime.date(2018, 3, 3),
datetime.date(2018, 3, 4),
datetime.date(2018, 3, 3),
datetime.date(2018, 3, 4),
],
]
expected = DataFrame(data=data, index=index)

tm.assert_frame_equal(result, expected)


class TestSorted:
"""everything you wanted to test about sorting"""
Expand All @@ -316,4 +292,4 @@ def test_sort_non_lexsorted(self):
dtype="int64",
)
result = sorted.loc[pd.IndexSlice["B":"C", "a":"c"], :]
tm.assert_frame_equal(result, expected)
tm.assert_frame_equal(result, expected)