You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
how to get info (total memory usage) of a dask.dataframe? #8115
Thanks for reporting @raybellwaves, I'm able to reproduce. It looks like if I pass verbose=True, then the Dask result is what I would expect based on the pandas .info() method:
add the total memory usage to the output of info(verbose=True)
change the default from verbose=False to verbose=True
1 seems like a good and straightforward addition to me, but 2 is a little more controversial since flipping the kwarg would trigger computation everytime info is called, which is obviously something that dask tries to avoid.
It was a pretty small change as most of it was already present. I was able to get it working but had a couple of small questions before I opened up a PR.
The enhancement to ddf.info(verbose=True)
Considering the problem faced by @raybellwaves, wouldn't another already implement approach be using ddf.info(memory_usage=True)?
Would you also suggest that I change the default from verbose=False to verbose=True, as stated in the older content?
Yeah you are right! I should have gone to look at the method to check on what kwargs were already there. Given that there is already a memory_usage=True kwarg, I think we can either just close this issue, or we could make verbose=True also set memory_usage=True.
For 2. I do not think we should flip the default from verbose=False to verbose=True. My thinking is that anytime dask triggers computation without the user explicitly calling compute() it is potentially surprising.
Activity
jrbourbeau commentedon Sep 2, 2021
Thanks for reporting @raybellwaves, I'm able to reproduce. It looks like if I pass
verbose=True, then the Dask result is what I would expect based on the pandas.info()method:jsignell commentedon Sep 7, 2021
So it seems like the task here is:
info(verbose=True)verbose=Falsetoverbose=True1 seems like a good and straightforward addition to me, but 2 is a little more controversial since flipping the kwarg would trigger computation everytime
infois called, which is obviously something that dask tries to avoid.chirag-indi commentedon Sep 18, 2021
Hi,
I'm a little new to Open Source. Could I take this up?
jsignell commentedon Sep 20, 2021
Sure! The work is to add the total_memory usage to the output of
infowhenverbose=True. Just let me know if you run into any issues :)chirag-indi commentedon Sep 20, 2021
Hi Julia! (@jsignell)
It was a pretty small change as most of it was already present. I was able to get it working but had a couple of small questions before I opened up a PR.
The enhancement to

ddf.info(verbose=True)Considering the problem faced by @raybellwaves, wouldn't another already implement approach be using

ddf.info(memory_usage=True)?Would you also suggest that I change the default from
verbose=Falsetoverbose=True, as stated in the older content?Thank you!
jsignell commentedon Sep 20, 2021
Yeah you are right! I should have gone to look at the method to check on what kwargs were already there. Given that there is already a
memory_usage=Truekwarg, I think we can either just close this issue, or we could makeverbose=Truealso setmemory_usage=True.For 2. I do not think we should flip the default from
verbose=Falsetoverbose=True. My thinking is that anytime dask triggers computation without the user explicitly callingcompute()it is potentially surprising.Set `memory_usage` to `True` if `verbose` is `True` in info (#8222)