code: def is_known_scalar(value):
      
      def _is_datetime_or_timedelta(value):
          # Using pandas.Series helps catch python, numpy and pandas
          # versions of these types
          return pd.Series(value).dtype.kind in ('M', 'm')
  
      return not np.iterable(value) and (isinstance(value, numbers.Number) or
                                         _is_datetime_or_timedelta(value))
docs: Return True if value is a type we expect in a dataframe