B = nx.Graph()
B.add_nodes_from(data['movie'].unique(), bipartite=0, label='movie')
B.add_nodes_from(data['actor'].unique(), bipartite=1, label='actor')
B.add_edges_from(edges, label='acted')
A = list(nx.connected_component_subgraphs(B))[0]
I am getting the below given error when am trying to use nx.connected_component_subgraphs(G).
In the dataset there are two coumns(movie and actor), and it's in the form bipartite graph.
I want to get connected components for the movie nodes.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-16-efff4e6fafc4> in <module>
----> 1 A = list(nx.connected_component_subgraphs(B))[0]
AttributeError: module 'networkx' has no attribute 'connected_component_subgraphs'