Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle/Control Warnings about Dataframe if highly fragmented #11

Open
JohnOmernik opened this issue Jul 24, 2022 · 1 comment
Open

Handle/Control Warnings about Dataframe if highly fragmented #11

JohnOmernik opened this issue Jul 24, 2022 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@JohnOmernik
Copy link

When working with a graph with lots of edges/nodes (3846 items) I got a full screen of warnings related to the d3graph.py:903

PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling frame.insert many time, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame use newframe=frame.copy()
adjmat[node]=0

It would be nice to do something that gets the same result here without pushing the warning at us (it makes a Jupyter Notebook real ugly).

Note, it still worked fine, it's just a nice to have.

@erdogant
Copy link
Owner

Thanks for mentioning this! However, I could not reproduce the issue.
I created a graph with almost 10k nodes but I do not see any warnings. Can you show with example code when this issue happens to you?

from d3graph import d3graph, adjmat2vec
size=(100, 100)
adjmat = pd.DataFrame(np.random.randint(0, 10, size=size))
# Initialize
d3 = d3graph()
d3.graph(adjmat)
d3.show()

@erdogant erdogant added bug Something isn't working question Further information is requested labels Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants