Skip to content

PandasError: DataFrame constructor not properly called! #5

@Werner0

Description

@Werner0

I had to downgrade to Pandas 0.19.1 due to another error. Now I get the following error. Please provide the package versions you used:

import networkx as nx
from NetworkxD3.NetworkxD3 import simpleNetworkx
from IPython.display import IFrame 

G = nx.Graph()
H = ["A","B","C","D","E","F","G", "H","I","J"]
G.add_nodes_from(H)
G.add_edges_from([("A","B"), ("A","C"), ("A","D"), ("A","J"), ("B","E"), ("B","F"),
("C","G"),("C","H"), ("D","I")])

simpleNetworkx(G)
IFrame('Net.html', width=400, height=400)

PandasError Traceback (most recent call last)
in ()
9 ("C","G"),("C","H"), ("D","I")])
10
---> 11 simpleNetworkx(G)
12 IFrame('Net.html', width=400, height=400)

/vagrant/JMB/NetworkxD3/NetworkxD3/NetworkxD3.py in simpleNetworkx(G)
49 ro.r('rdf=data.frame()')
50
---> 51 df = p.DataFrame(G.edges())
52
53 df_r = com.convert_to_r_dataframe(df)

~/anaconda3/envs/normal/lib/python3.6/site-packages/pandas/core/frame.py in init(self, data, index, columns, dtype, copy)
343 copy=False)
344 else:
--> 345 raise PandasError('DataFrame constructor not properly called!')
346
347 NDFrame.init(self, mgr, fastpath=True)

PandasError: DataFrame constructor not properly called!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions