code: def _remove_na_single(x, axis='rows'):
      
      if x.ndim == 1:
          # 1D arrays
          x_mask = ~np.isnan(x)
      else:
          # 2D arrays
          ax = 1 if axis == 'rows' else 0
          x_mask = ~np.any(np.isnan(x), axis=ax)
      # Check if missing values are present
      if ~x_mask.all():
          ax = 0 if axis == 'rows' else 1
          ax = 0 if x.ndim == 1 else ax
          x = x.compress(x_mask, axis=ax)
      return x
docs: Remove NaN in a single array.
      This is an internal Pingouin function.