code: def data_type(data, grouped=False, columns=None, key_on='idx', iter_idx=None):
      '''Data type check for automatic import'''
      if iter_idx:
          return Data.from_mult_iters(idx=iter_idx, **data)
      if pd:
          if isinstance(data, (pd.Series, pd.DataFrame)):
              return Data.from_pandas(data, grouped=grouped, columns=columns,
                                      key_on=key_on)
      if isinstance(data, (list, tuple, dict)):
              return Data.from_iter(data)
      else:
          raise ValueError('This data type is not supported by Vincent.'f data_type(data, grouped=False, columns=None, key_on='idx', iter_idx=None):
      '''Data type check for automatic import'''
      if iter_idx:
          return Data.from_mult_iters(idx=iter_idx, **data)
      if pd:
          if isinstance(data, (pd.Series, pd.DataFrame)):
              return Data.from_pandas(data, grouped=grouped, columns=columns,
                                      key_on=key_on)
      if isinstance(data, (list, tuple, dict)):
              return Data.from_iter(data)
      else:
          raise ValueError('This data type is not supported by Vincent.')
docs: Data type check for automatic import