code: def _cast_values_for_fillna(values, dtype):
      
      # TODO: for int-dtypes we make a copy, but for everything else this
      #  alters the values in-place.  Is this intentional?
  
      if (is_datetime64_dtype(dtype) or is_datetime64tz_dtype(dtype) or
              is_timedelta64_dtype(dtype)):
          values = values.view(np.int64)
  
      elif is_integer_dtype(values):
          # NB: this check needs to come after the datetime64 check above
          values = ensure_float64(values)
  
      return values
docs: Cast values to a dtype that algos.pad and algos.backfill can handle.