def _filter_blacklisters(df, blacklist):
    "Checks vessel AIS types and ommits blacklisted vessel types from the\n    filtered data. Appends ommitted vessels' MMSI's to blacklist.txt.\n\n    Args:\n        df: Vessel movement DataFrame.\n\n    Returns:\n        Filtered vessel movement DataFrame.\n    "
    df = df.loc[(~ df.loc[:, 'MMSI'].isin(blacklist)), :]
    new_blacklisters = []
    for j in range(df.shape[0]):
        if (df.iloc[j]['AIS Type'] in AUTO_BLACKLIST):
            new_blacklisters.append(df.iloc[j]['MMSI'])
    with open('../cache/blacklist.txt', 'a') as f:
        contents = [str(mmsi) for mmsi in new_blacklisters]
        if contents:
            f.write(('\n'.join(contents) + '\n'))
    df = df.loc[(~ df.loc[:, 'MMSI'].isin(new_blacklisters)), :]
    return df
Checks vessel AIS types and ommits blacklisted vessel types from the
filtered data. Appends ommitted vessels' MMSI's to blacklist.txt.

Args:
    df: Vessel movement DataFrame.

Returns:
    Filtered vessel movement DataFrame.
def _filter_blacklisters(df, blacklist):
    "Checks vessel AIS types and ommits blacklisted vessel types from the\n    filtered data. Appends ommitted vessels' MMSI's to blacklist.txt.\n\n    Args:\n        df: Vessel movement DataFrame.\n\n    Returns:\n        Filtered vessel movement DataFrame.\n    "
    df = df.loc[(~ df.loc[:, 'MMSI'].isin(blacklist)), :]
    new_blacklisters = []
    for j in range(df.shape[0]):
        if (df.iloc[j]['AIS Type'] in AUTO_BLACKLIST):
            new_blacklisters.append(df.iloc[j]['MMSI'])
    with open('../cache/blacklist.txt', 'a') as f:
        contents = [str(mmsi) for mmsi in new_blacklisters]
        if contents:
            f.write(('\n'.join(contents) + '\n'))
    df = df.loc[(~ df.loc[:, 'MMSI'].isin(new_blacklisters)), :]
    return df