title: Is there an easy way to prune disconnected networks in a NetworkX graph?
body: <p>I'm using Python's NetworkX package to calculate a bunch of network statistics for networks of varying size. I'm sweeping an independent parameter that systematically prunes edges, so sometimes a small network will become disconnected from the main network. Is there an easy way to detect and remove those smaller disconnected networks in NetworkX?</p>