Open thisismygitrepo opened 1 year ago
The filter
argument for objgraph.show_refs()
/objgraph.show_backrefs()
works like this. E.g.
objgraph.show_refs([start], filter=lambda x: not isinstance(x, pandas.DataFrame))
I see that it is rather underdocumented. The docs for objgraph.typestats()
also has it, and describes it as
If filter is specified, it should be a function taking one argument and returning a boolean. Objects for which filter(obj) returns False will be ignored.
and I should copy the second sentence and include it in the explanation of filter
in the docs for show_refs/backrefs.
Thanks for showing this. I'm aware of this one already and it is a bit restricted in its functionality.
pandas dataframe
object in itself is an important object in my graph but not its details. This applies to hunderds of other objects.dict
object, but I would like to hide it because its parent call it __cache
, not because of its type.+1 this would be helpful — essentially I want to express “render objects of this type, but don’t expand them further”.
Can we please have a direly missing option to block given objects from further expansion? For example, I want to have very deep expansion of my object but I don't want to expose any low level details of foreign objects, e.g.
pandas dataframe
. Unless I'm very much mistaken, I couldn't see an option for this. Thank you.