/
usr
/
local
/
lib64
/
python3.6
/
site-packages
/
pandas
/
tests
/
series
/
methods
/
/usr/local/lib64/python3.6/site-packages/pandas/tests/series/methods
mkdir
upload
Name
Size
Mode
Actions
__pycache__/
-
0755
rm
test_align.py
5359
0644
edit
dl
rm
test_append.py
9600
0644
edit
dl
rm
test_argsort.py
2249
0644
edit
dl
rm
test_asfreq.py
3616
0644
edit
dl
rm
test_asof.py
5515
0644
edit
dl
rm
test_astype.py
2628
0644
edit
dl
rm
test_at_time.py
2629
0644
edit
dl
rm
test_autocorr.py
999
0644
edit
dl
rm
test_between.py
1197
0644
edit
dl
rm
test_between_time.py
5086
0644
edit
dl
rm
test_clip.py
3384
0644
edit
dl
rm
test_combine.py
627
0644
edit
dl
rm
test_combine_first.py
3411
0644
edit
dl
rm
test_compare.py
3734
0644
edit
dl
rm
test_convert_dtypes.py
9914
0644
edit
dl
rm
test_count.py
1123
0644
edit
dl
rm
test_cov_corr.py
5215
0644
edit
dl
rm
test_describe.py
4640
0644
edit
dl
rm
test_diff.py
2331
0644
edit
dl
rm
test_drop.py
2986
0644
edit
dl
rm
test_droplevel.py
629
0644
edit
dl
rm
test_drop_duplicates.py
6850
0644
edit
dl
rm
test_duplicated.py
996
0644
edit
dl
rm
test_equals.py
1295
0644
edit
dl
rm
test_explode.py
3538
0644
edit
dl
rm
test_fillna.py
6513
0644
edit
dl
rm
test_first_and_last.py
2042
0644
edit
dl
rm
test_head_tail.py
343
0644
edit
dl
rm
test_interpolate.py
27757
0644
edit
dl
rm
test_isin.py
3445
0644
edit
dl
rm
test_nlargest.py
7121
0644
edit
dl
rm
test_pct_change.py
2968
0644
edit
dl
rm
test_quantile.py
6810
0644
edit
dl
rm
test_rank.py
20287
0644
edit
dl
rm
test_reindex_like.py
1245
0644
edit
dl
rm
test_rename.py
3378
0644
edit
dl
rm
test_rename_axis.py
1503
0644
edit
dl
rm
test_replace.py
15559
0644
edit
dl
rm
test_reset_index.py
4636
0644
edit
dl
rm
test_round.py
1970
0644
edit
dl
rm
test_searchsorted.py
2121
0644
edit
dl
rm
test_shift.py
12595
0644
edit
dl
rm
test_sort_index.py
12277
0644
edit
dl
rm
test_sort_values.py
7981
0644
edit
dl
rm
test_to_dict.py
742
0644
edit
dl
rm
test_to_period.py
1755
0644
edit
dl
rm
test_to_timestamp.py
2616
0644
edit
dl
rm
test_truncate.py
5557
0644
edit
dl
rm
test_tz_convert.py
1008
0644
edit
dl
rm
test_tz_localize.py
3108
0644
edit
dl
rm
test_unstack.py
4208
0644
edit
dl
rm
test_update.py
4213
0644
edit
dl
rm
test_value_counts.py
8136
0644
edit
dl
rm
__init__.py
225
0644
edit
dl
rm
Edit:
/usr/local/lib64/python3.6/site-packages/pandas/tests/series/methods/test_droplevel.py
(629B)
import pytest from pandas import MultiIndex, Series import pandas._testing as tm class TestDropLevel: def test_droplevel(self): # GH#20342 ser = Series([1, 2, 3, 4]) ser.index = MultiIndex.from_arrays( [(1, 2, 3, 4), (5, 6, 7, 8)], names=["a", "b"] ) expected = ser.reset_index("b", drop=True) result = ser.droplevel("b", axis="index") tm.assert_series_equal(result, expected) # test that droplevel raises ValueError on axis != 0 with pytest.raises(ValueError, match="No axis named columns"): ser.droplevel(1, axis="columns")
Save
cmd:
run