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

Function test_memory_usage_series

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

Source from the content-addressed store, hash-verified

4147@pytest.mark.parametrize("index", [True, False])
4148@pytest.mark.parametrize("deep", [True, False])
4149def test_memory_usage_series(index, deep):
4150 s = pd.Series([1, 2, 3, 4], index=["a", "b", "c", "d"])
4151 if pyarrow_strings_enabled():
4152 # pandas should measure memory usage of pyarrow strings
4153 s = to_pyarrow_string(s)
4154 expected = s.memory_usage(index=index, deep=deep)
4155 ds = dd.from_pandas(s, npartitions=2)
4156 result = ds.memory_usage(index=index, deep=deep)
4157 assert_eq(expected, result)
4158
4159
4160@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