def number_connected_components(G):
    return len(connected_components(G))
Return number of connected components in graph.
dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/algorithms/components/connected.py/number_connected_components