Use the Separate into Loose Parts Operator.
Possibly the quickest and simplest way to do this is to run the bpy.ops.mesh.separate(type='LOOSE') operator to split the single mesh into loose parts. Then remove all but the object with the most vertices.
import bpy
context = bpy.context
# edit mode
bpy.ops.object.mode_set(mode='EDIT')
# split into loose parts
bpy.ops.mesh.separate(type='LOOSE')
# object mode
bpy.ops.object.mode_set(mode='OBJECT')
parts = context.selected_objects
# sort by number of verts (last has most)
parts.sort(key=lambda o: len(o.data.vertices))
# print
for part in parts:
print(part.name, len(part.data.vertices))
# pop off the last
parts.pop()
# remove the rest
for o in parts:
bpy.data.objects.remove(o)
There are a number of methods for doing this without the operator in answers to How to find the number of loose parts with Python? including my answer which returns a list of verts for each island in selection which would be ideal for making an interactive tool to do this per selection, to clean "splatter-cake" verts.