acoustic_data_science/processing/process_data.py
def remove_nans(df):
    """
    Removes any rows containing nan values and two rows either side of each of
    these rows.
    """
    m = df.isna().any(axis=1)
    return df[
        ~(
            m
            | m.shift(fill_value=False)
            | m.shift(-1, fill_value=False)
            | m.shift(-2, fill_value=False)
        )
    ]

    Removes any rows containing nan values and two rows either side of each of
    these rows.
    
Removes any rows containing nan values and two rows either side of each of
these rows.
Removes any rows containing nan values and two rows either side of each of these rows .
def remove_nans(df):
    m = df.isna().any(axis=1)
    return df[
        ~(
            m
            | m.shift(fill_value=False)
            | m.shift(-1, fill_value=False)
            | m.shift(-2, fill_value=False)
        )
    ]
def remove_nans ( df ) : m = df . isna ( ) . any ( axis = 1 ) return df [ ~ ( m | m . shift ( fill_value = False ) | m . shift ( - 1 , fill_value = False ) | m . shift ( - 2 , fill_value = False ) ) ]
Removes any rows containing nan values and two rows either side of each of
these rows.
Removes any rows containing nan values and two rows either side of each of these rows .
"""
    Removes any rows containing nan values and two rows either side of each of
    these rows.
    """
df