def _sanitize_vmr(df):
    "Filters entries with '511' error, impossibly high speed, abnormally\n    high vessel width, as well as singletons (only one entry) from vessel\n    movement DataFrame.\n\n    Args:\n        df: Vessel movement DataFrame.\n\n    Returns:\n        Sanitized vessel movement report DataFrame.\n    "
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'Beam ft'] >= 500)].index)), :]
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'Course'] == 511)].index)), :]
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'Heading'] == 511)].index)), :]
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'VSPD kn'] >= 40)].index)), :]
    singleton = (df.loc[:, 'MMSI'].value_counts() == 1)
    single_mmsi = df.loc[:, 'MMSI'].value_counts()[singleton].index.values
    df = df.loc[(~ df.loc[:, 'MMSI'].isin(single_mmsi)), :]
    return df
Filters entries with '511' error, impossibly high speed, abnormally
high vessel width, as well as singletons (only one entry) from vessel
movement DataFrame.

Args:
    df: Vessel movement DataFrame.

Returns:
    Sanitized vessel movement report DataFrame.
def _sanitize_vmr(df):
    "Filters entries with '511' error, impossibly high speed, abnormally\n    high vessel width, as well as singletons (only one entry) from vessel\n    movement DataFrame.\n\n    Args:\n        df: Vessel movement DataFrame.\n\n    Returns:\n        Sanitized vessel movement report DataFrame.\n    "
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'Beam ft'] >= 500)].index)), :]
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'Course'] == 511)].index)), :]
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'Heading'] == 511)].index)), :]
    df = df.loc[(~ df.index.isin(df[(df.loc[:, 'VSPD kn'] >= 40)].index)), :]
    singleton = (df.loc[:, 'MMSI'].value_counts() == 1)
    single_mmsi = df.loc[:, 'MMSI'].value_counts()[singleton].index.values
    df = df.loc[(~ df.loc[:, 'MMSI'].isin(single_mmsi)), :]
    return df