MCPcopy Create free account
hub / github.com/dask/dask / test_memory_usage_index

Function test_memory_usage_index

dask/dataframe/tests/test_dataframe.py:4161–4169  ·  view source on GitHub ↗
(deep)

Source from the content-addressed store, hash-verified

4159
4160@pytest.mark.parametrize("deep", [True, False])
4161def test_memory_usage_index(deep):
4162 s = pd.Series([1, 2, 3, 4], index=["a", "b", "c", "d"])
4163 if pyarrow_strings_enabled():
4164 # pandas should measure memory usage of pyarrow strings
4165 s = to_pyarrow_string(s)
4166 expected = s.index.memory_usage(deep=deep)
4167 ds = dd.from_pandas(s, npartitions=2)
4168 result = ds.index.memory_usage(deep=deep)
4169 assert_eq(expected, result)
4170
4171
4172@pytest.mark.parametrize("index", [True, False])

Callers

nothing calls this directly

Calls 3

pyarrow_strings_enabledFunction · 0.90
assert_eqFunction · 0.90
memory_usageMethod · 0.45

Tested by

no test coverage detected