class_docstr: A Term that should be computed from a tuple of inputs.
  
  This is the base class for :class:`zipline.pipeline.Factor`,
  :class:`zipline.pipeline.Filter`, and :class:`zipline.pipeline.Classifier`.
class_docstr_tok: ["A","Term","that","should","be","computed","from","a","tuple","of","inputs",".","This","is","the","base","class","for",":","class",":","`","zipline.pipeline.Factor","`",",",":","class",":","`","zipline.pipeline.Filter","`",",","and",":","class",":","`","zipline.pipeline.Classifier","`","."]
docstr: Create a new term that fills missing values of this term's output with
  ``fill_value``.
  
  Parameters
  ----------
  fill_value : zipline.pipeline.ComputableTerm, or object.
      Object to use as replacement for missing values.
  
      If a ComputableTerm (e.g. a Factor) is passed, that term's results
      will be used as fill values.
  
      If a scalar (e.g. a number) is passed, the scalar will be used as a
      fill value.
  
  Examples
  --------
  
  **Filling with a Scalar:**
  
  Let ``f`` be a Factor which would produce the following output::
  
                   AAPL   MSFT    MCD     BK
      2017-03-13    1.0    NaN    3.0    4.0
      2017-03-14    1.5    2.5    NaN    NaN
  
  Then ``f.fillna(0)`` produces the following output::
  
                   AAPL   MSFT    MCD     BK
      2017-03-13    1.0    0.0    3.0    4.0
      2017-03-14    1.5    2.5    0.0    0.0
  
  **Filling with a Term:**
  
  Let ``f`` be as above, and let ``g`` be another Factor which would
  produce the following output::
  
                   AAPL   MSFT    MCD     BK
      2017-03-13   10.0   20.0   30.0   40.0
      2017-03-14   15.0   25.0   35.0   45.0
  
  Then, ``f.fillna(g)`` produces the following output::
  
                   AAPL   MSFT    MCD     BK
      2017-03-13    1.0   20.0    3.0    4.0
      2017-03-14    1.5    2.5   35.0   45.0
  
  Returns
  -------
  filled : zipline.pipeline.ComputableTerm
      A term computing the same results as ``self``, but with missing
      values filled in using values from ``fill_value``.
docstr_tok: ["Create","a","new","term","that","fills","missing","values","of","this","term","'s","output","with","``","fill_value","``",".","Parameters","--","--","--","--","--","fill_value",":","zipline.pipeline.ComputableTerm",",","or","object",".","Object","to","use","as","replacement","for","missing","values",".","If","a","ComputableTerm","(","e.g",".","a","Factor",")","is","passed",",","that","term","'s","results","will","be","used","as","fill","values",".","If","a","scalar","(","e.g",".","a","number",")","is","passed",",","the","scalar","will","be","used","as","a","fill","value",".","Examples","--","--","--","--","*","*","Filling","with","a","Scalar",":","*","*","Let","``","f","``","be","a","Factor","which","would","produce","the","following","output",":",":","AAPL","MSFT","MCD","BK","2017-03-13","1.0","NaN","3.0","4.0","2017-03-14","1.5","2.5","NaN","NaN","Then","``","f.fillna","(","0",")","``","produces","the","following","output",":",":","AAPL","MSFT","MCD","BK","2017-03-13","1.0","0.0","3.0","4.0","2017-03-14","1.5","2.5","0.0","0.0","*","*","Filling","with","a","Term",":","*","*","Let","``","f","``","be","as","above",",","and","let","``","g","``","be","another","Factor","which","would","produce","the","following","output",":",":","AAPL","MSFT","MCD","BK","2017-03-13","10.0","20.0","30.0","40.0","2017-03-14","15.0","25.0","35.0","45.0","Then",",","``","f.fillna","(","g",")","``","produces","the","following","output",":",":","AAPL","MSFT","MCD","BK","2017-03-13","1.0","20.0","3.0","4.0","2017-03-14","1.5","2.5","35.0","45.0","Returns","--","--","--","-","filled",":","zipline.pipeline.ComputableTerm","A","term","computing","the","same","results","as","``","self","``",",","but","with","missing","values","filled","in","using","values","from","``","fill_value","``","."]
code: def fillna(self, fill_value):
      """
      Create a new term that fills missing values of this term's output with
      ``fill_value``.
  
      Parameters
      ----------
      fill_value : zipline.pipeline.ComputableTerm, or object.
          Object to use as replacement for missing values.
  
          If a ComputableTerm (e.g. a Factor) is passed, that term's results
          will be used as fill values.
  
          If a scalar (e.g. a number) is passed, the scalar will be used as a
          fill value.
  
      Examples
      --------
  
      **Filling with a Scalar:**
  
      Let ``f`` be a Factor which would produce the following output::
  
                       AAPL   MSFT    MCD     BK
          2017-03-13    1.0    NaN    3.0    4.0
          2017-03-14    1.5    2.5    NaN    NaN
  
      Then ``f.fillna(0)`` produces the following output::
  
                       AAPL   MSFT    MCD     BK
          2017-03-13    1.0    0.0    3.0    4.0
          2017-03-14    1.5    2.5    0.0    0.0
  
      **Filling with a Term:**
  
      Let ``f`` be as above, and let ``g`` be another Factor which would
      produce the following output::
  
                       AAPL   MSFT    MCD     BK
          2017-03-13   10.0   20.0   30.0   40.0
          2017-03-14   15.0   25.0   35.0   45.0
  
      Then, ``f.fillna(g)`` produces the following output::
  
                       AAPL   MSFT    MCD     BK
          2017-03-13    1.0   20.0    3.0    4.0
          2017-03-14    1.5    2.5   35.0   45.0
  
      Returns
      -------
      filled : zipline.pipeline.ComputableTerm
          A term computing the same results as ``self``, but with missing
          values filled in using values from ``fill_value``.
      """
      if self.dtype == bool_dtype:
          raise TypeError("fillna() is not supported for Filters")
  
      if isinstance(fill_value, LoadableTerm):
          raise TypeError(
              "Can't use expression {} as a fill value. Did you mean to "
              "append '.latest?'".format(fill_value)
          )
      elif isinstance(fill_value, ComputableTerm):
          if_false = fill_value
      else:
          # Assume we got a scalar value. Make sure it's compatible with our
          # dtype.
          try:
              fill_value = _coerce_to_dtype(fill_value, self.dtype)
          except TypeError as e:
              raise TypeError(
                  "Fill value {value!r} is not a valid choice "
                  "for term {termname} with dtype {dtype}.\n\n"
                  "Coercion attempt failed with: {error}".format(
                      termname=type(self).__name__,
                      value=fill_value,
                      dtype=self.dtype,
                      error=e,
                  )
              )
  
          if_false = self._constant_type(
              const=fill_value,
              dtype=self.dtype,
              missing_value=self.missing_value,
          )
  
      return self.notnull().if_else(if_true=self, if_false=if_false)
  
imports: from abc import ABCMeta, abstractproperty, abstractmethod
  from bisect import insort
  from collections import Mapping
  from weakref import WeakValueDictionary
  from numpy import array, dtype, ndarray
  from six import with_metaclass
  from zipline.assets import Asset
  from zipline.errors import DTypeNotSpecified, InvalidOutputName, NonSliceableTerm, NonWindowSafeInput, NotDType, NonPipelineInputs, TermInputsNotSpecified, TermOutputsEmpty, UnsupportedDType, WindowLengthNotSpecified
  from zipline.lib.adjusted_array import can_represent_dtype
  from zipline.lib.labelarray import LabelArray
  from zipline.utils.input_validation import expect_types
  from zipline.utils.memoize import classlazyval, lazyval
  from zipline.utils.numpy_utils import bool_dtype, categorical_dtype, datetime64ns_dtype, default_missing_value_for_dtype, float64_dtype
  from zipline.utils.sharedoc import templated_docstring, PIPELINE_ALIAS_NAME_DOC, PIPELINE_DOWNSAMPLING_FREQUENCY_DOC
  from .domain import Domain, GENERIC, infer_domain
  from .downsample_helpers import expect_downsample_frequency
  from .sentinels import NotSpecified
label_desc: Use image node_id 15 for calling the ComputableTerm obj's underlying member method code with example usage: obj.fillna(fill_value) and returns: self