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

Function test_memory_usage_index

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

Source from the content-addressed store, hash-verified

4168
4169@pytest.mark.parametrize("deep", [True, False])
4170def test_memory_usage_index(deep):
4171 s = pd.Series([1, 2, 3, 4], index=["a", "b", "c", "d"])
4172 if pyarrow_strings_enabled():
4173 # pandas should measure memory usage of pyarrow strings
4174 s = to_pyarrow_string(s)
4175 expected = s.index.memory_usage(deep=deep)
4176 ds = dd.from_pandas(s, npartitions=2)
4177 result = ds.index.memory_usage(deep=deep)
4178 assert_eq(expected, result)
4179
4180
4181@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