TST: changed behavior of df.loc on multiindex
-added unittest for issue #43599
-error occurs due to different versions of pandas
-made the requested changes 

Hello @gamenerd457! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/tests/indexing/multiindex/test_loc.py`](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py):

> [Line 915:1](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L915): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 0
> [Line 916:5](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L916): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 918:14](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L918): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 918:16](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L918): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 918:87](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L918): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 918:89](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L918): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 918:89](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L918): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (96 > 88 characters)
> [Line 919:9](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L919): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line
> [Line 920:28](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L920): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 920:32](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L920): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 922:14](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L922): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 922:16](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L922): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 922:86](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L922): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 922:88](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L922): [E251](https://duckduckgo.com/?q=pep8%20E251) unexpected spaces around keyword / parameter equals
> [Line 922:89](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L922): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (95 > 88 characters)
> [Line 923:9](https://github.com/pandas-dev/pandas/blob/26551a7e5ec36d0a8291233d42a931c5c27a619f/pandas/tests/indexing/multiindex/test_loc.py#L923): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line





##### Comment last updated at 2021-10-11 13:43:30 UTC Please finish #43879 