/usr/local/lib64/python3.6/site-packages/pandas/tests/frame
NameSizeModeActions
apply/-0755rm
methods/-0755rm
__pycache__/-0755rm
common.py11190644editdlrm
conftest.py88550644editdlrm
test_alter_axes.py88010644editdlrm
test_analytics.py465570644editdlrm
test_api.py195890644editdlrm
test_arithmetic.py549990644editdlrm
test_axis_select_reindex.py183200644editdlrm
test_block_internals.py231940644editdlrm
test_combine_concat.py86070644editdlrm
test_constructors.py1006070644editdlrm
test_cumulative.py42280644editdlrm
test_dtypes.py118120644editdlrm
test_join.py87790644editdlrm
test_missing.py256160644editdlrm
test_nonunique_indexes.py175010644editdlrm
test_operators.py90680644editdlrm
test_period.py11840644editdlrm
test_query_eval.py475680644editdlrm
test_repr_info.py67290644editdlrm
test_reshape.py474820644editdlrm
test_sort_values_level_as_str.py25500644editdlrm
test_subclass.py235730644editdlrm
test_timeseries.py22180644editdlrm
test_timezones.py61580644editdlrm
test_to_csv.py481820644editdlrm
test_validate.py10950644editdlrm
__init__.py00644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pandas/tests/frame/test_period.py (1184B)
import numpy as np from pandas import DataFrame, Index, PeriodIndex, period_range import pandas._testing as tm class TestPeriodIndex: def test_as_frame_columns(self): rng = period_range("1/1/2000", periods=5) df = DataFrame(np.random.randn(10, 5), columns=rng) ts = df[rng[0]] tm.assert_series_equal(ts, df.iloc[:, 0]) # GH # 1211 repr(df) ts = df["1/1/2000"] tm.assert_series_equal(ts, df.iloc[:, 0]) def test_frame_setitem(self): rng = period_range("1/1/2000", periods=5, name="index") df = DataFrame(np.random.randn(5, 3), index=rng) df["Index"] = rng rs = Index(df["Index"]) tm.assert_index_equal(rs, rng, check_names=False) assert rs.name == "Index" assert rng.name == "index" rs = df.reset_index().set_index("index") assert isinstance(rs.index, PeriodIndex) tm.assert_index_equal(rs.index, rng) def test_frame_index_to_string(self): index = PeriodIndex(["2011-1", "2011-2", "2011-3"], freq="M") frame = DataFrame(np.random.randn(3, 4), index=index) # it works! frame.to_string()