(ds['centre_direction'] != "none" or ds['centre_direction'] != "*") this should be probably changed to (ds['centre_direction'] != "none" **and** ds['centre_direction'] != "*")