MCPcopy
hub / github.com/pandas-dev/pandas / test_coordinates

Function test_coordinates

pandas/tests/io/pytables/test_store.py:663–675  ·  view source on GitHub ↗
(temp_hdfstore)

Source from the content-addressed store, hash-verified

661
662
663def test_coordinates(temp_hdfstore):
664 df = DataFrame(
665 np.random.default_rng(2).standard_normal((10, 4)),
666 columns=Index(list("ABCD")),
667 index=date_range("2000-01-01", periods=10, freq="B"),
668 )
669
670 store = temp_hdfstore
671 store.append("df", df)
672
673 # all
674 c = store.select_as_coordinates("df")
675 assert (c.values == np.arange(len(df.index))).all()
676
677
678def test_coordinates2(temp_hdfstore):

Callers

nothing calls this directly

Calls 6

DataFrameClass · 0.90
IndexClass · 0.90
date_rangeFunction · 0.90
select_as_coordinatesMethod · 0.80
appendMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected