def _maybe_numeric_slice(df, slice_, include_bool=False):
 if (slice_ is None):
  dtypes = [np.number]
  if include_bool:
   dtypes.append(bool)
  slice_ = IndexSlice[:, df.select_dtypes(include=dtypes).columns]
 return slice_

def _maybe_numeric_slice ( df , slice_ , include_bool = False ) : if ( slice_ is None ) : dtypes = [ np . number ] if include_bool : dtypes . append ( bool ) slice_ = IndexSlice [ : , df . select_dtypes ( include = dtypes ) . columns ] return slice_
want nice defaults for background_gradient that dont break with non-numeric data .