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

Function test_memory_usage_series

dask/dataframe/tests/test_dataframe.py:4158–4166  ·  view source on GitHub ↗
(index, deep)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

memory_usageMethod · 0.95
pyarrow_strings_enabledFunction · 0.90
assert_eqFunction · 0.90
memory_usageMethod · 0.45

Tested by

no test coverage detected