def _invalidate_string_dtypes(dtype_set):
 non_string_dtypes = (dtype_set - _string_dtypes)
 if (non_string_dtypes != dtype_set):
  raise TypeError("string dtypes are not allowed, use 'object' instead")

def _invalidate_string_dtypes ( dtype_set ) : non_string_dtypes = ( dtype_set - _string_dtypes ) if ( non_string_dtypes != dtype_set ) : raise TypeError ( "string dtypes are not allowed, use 'object' instead" )
change string like dtypes to object for dataframe .