(temp_hdfstore)
| 55 | |
| 56 | |
| 57 | def test_select_with_dups(temp_hdfstore): |
| 58 | # single dtypes |
| 59 | df = DataFrame( |
| 60 | np.random.default_rng(2).standard_normal((10, 4)), columns=["A", "A", "B", "B"] |
| 61 | ) |
| 62 | df.index = date_range("20130101 9:30", periods=10, freq="min", unit="ns") |
| 63 | |
| 64 | temp_hdfstore.append("df", df) |
| 65 | |
| 66 | result = temp_hdfstore.select("df") |
| 67 | expected = df |
| 68 | tm.assert_frame_equal(result, expected, by_blocks=True) |
| 69 | |
| 70 | result = temp_hdfstore.select("df", columns=df.columns) |
| 71 | expected = df |
| 72 | tm.assert_frame_equal(result, expected, by_blocks=True) |
| 73 | |
| 74 | result = temp_hdfstore.select("df", columns=["A"]) |
| 75 | expected = df.loc[:, ["A"]] |
| 76 | tm.assert_frame_equal(result, expected) |
| 77 | |
| 78 | |
| 79 | def test_select_with_dups_across_dtypes(temp_hdfstore): |
nothing calls this directly
no test coverage detected