Skip to main content
`Ctrl`+`K`

# pandas.api.types.is_iterator

pandas.api.types.is_iterator(obj)

  Check if the object is an iterator.

  This is intended for generators, not list-like objects.

  Parameters:
    obj The object to check
  Returns:
    is_iter bool

      Whether obj is an iterator.

  Examples

      >>> import datetime
      >>> from pandas.api.types import is_iterator
      >>> is_iterator((x for x in []))
      True
      >>> is_iterator([1, 2, 3])
      False
      >>> is_iterator(datetime.datetime(2017, 1, 1))
      False
      >>> is_iterator("foo")
      False
      >>> is_iterator(1)
      False