class_docstr: An abstract pipeline loader for estimates data that can load data a
  variable number of quarters forwards/backwards from calendar dates
  depending on the `num_announcements` attribute of the columns' dataset.
  If split adjustments are to be applied, a loader, split-adjusted columns,
  and the split-adjusted asof-date must be supplied.
  
  Parameters
  ----------
  estimates : pd.DataFrame
      The raw estimates data.
      ``estimates`` must contain at least 5 columns:
          sid : int64
              The asset id associated with each estimate.
  
          event_date : datetime64[ns]
              The date on which the event that the estimate is for will/has
              occurred..
  
          timestamp : datetime64[ns]
              The date on which we learned about the estimate.
  
          fiscal_quarter : int64
              The quarter during which the event has/will occur.
  
          fiscal_year : int64
              The year during which the event has/will occur.
  
  name_map : dict[str -> str]
      A map of names of BoundColumns that this loader will load to the
      names of the corresponding columns in `events`.
class_docstr_tok: ["An","abstract","pipeline","loader","for","estimates","data","that","can","load","data","a","variable","number","of","quarters","forwards\/backwards","from","calendar","dates","depending","on","the","`","num_announcements","`","attribute","of","the","columns","'","dataset",".","If","split","adjustments","are","to","be","applied",",","a","loader",",","split-adjusted","columns",",","and","the","split-adjusted","asof-date","must","be","supplied",".","Parameters","--","--","--","--","--","estimates",":","pd.DataFrame","The","raw","estimates","data",".","``","estimates","``","must","contain","at","least","5","columns",":","sid",":","int64","The","asset","id","associated","with","each","estimate",".","event_date",":","datetime64","[","ns","]","The","date","on","which","the","event","that","the","estimate","is","for","will\/has","occurred","..","timestamp",":","datetime64","[","ns","]","The","date","on","which","we","learned","about","the","estimate",".","fiscal_quarter",":","int64","The","quarter","during","which","the","event","has\/will","occur",".","fiscal_year",":","int64","The","year","during","which","the","event","has\/will","occur",".","name_map",":","dict","[","str","-",">","str","]","A","map","of","names","of","BoundColumns","that","this","loader","will","load","to","the","names","of","the","corresponding","columns","in","`","events","`","."]
docstr: Selects the requested data for each date.
  
  Parameters
  ----------
  zero_qtr_data : pd.DataFrame
      The 'time zero' data for each calendar date per sid.
  zeroth_quarter_idx : pd.Index
      An index of calendar dates, sid, and normalized quarters, for only
      the rows that have a next or previous earnings estimate.
  stacked_last_per_qtr : pd.DataFrame
      The latest estimate known with the dates, normalized quarter, and
      sid as the index.
  num_announcements : int
      The number of annoucements out the user requested relative to
      each date in the calendar dates.
  dates : pd.DatetimeIndex
      The calendar dates for which estimates data is requested.
  
  Returns
  --------
  requested_qtr_data : pd.DataFrame
      The DataFrame with the latest values for the requested quarter
      for all columns; `dates` are the index and columns are a MultiIndex
      with sids at the top level and the dataset columns on the bottom.
docstr_tok: ["Selects","the","requested","data","for","each","date",".","Parameters","--","--","--","--","--","zero_qtr_data",":","pd.DataFrame","The","'time","zero","'","data","for","each","calendar","date","per","sid",".","zeroth_quarter_idx",":","pd.Index","An","index","of","calendar","dates",",","sid",",","and","normalized","quarters",",","for","only","the","rows","that","have","a","next","or","previous","earnings","estimate",".","stacked_last_per_qtr",":","pd.DataFrame","The","latest","estimate","known","with","the","dates",",","normalized","quarter",",","and","sid","as","the","index",".","num_announcements",":","int","The","number","of","annoucements","out","the","user","requested","relative","to","each","date","in","the","calendar","dates",".","dates",":","pd.DatetimeIndex","The","calendar","dates","for","which","estimates","data","is","requested",".","Returns","--","--","--","--","requested_qtr_data",":","pd.DataFrame","The","DataFrame","with","the","latest","values","for","the","requested","quarter","for","all","columns",";","`","dates","`","are","the","index","and","columns","are","a","MultiIndex","with","sids","at","the","top","level","and","the","dataset","columns","on","the","bottom","."]
code: def get_requested_quarter_data(
      self,
      zero_qtr_data,
      zeroth_quarter_idx,
      stacked_last_per_qtr,
      num_announcements,
      dates,
  ):
      """
      Selects the requested data for each date.
  
      Parameters
      ----------
      zero_qtr_data : pd.DataFrame
          The 'time zero' data for each calendar date per sid.
      zeroth_quarter_idx : pd.Index
          An index of calendar dates, sid, and normalized quarters, for only
          the rows that have a next or previous earnings estimate.
      stacked_last_per_qtr : pd.DataFrame
          The latest estimate known with the dates, normalized quarter, and
          sid as the index.
      num_announcements : int
          The number of annoucements out the user requested relative to
          each date in the calendar dates.
      dates : pd.DatetimeIndex
          The calendar dates for which estimates data is requested.
  
      Returns
      --------
      requested_qtr_data : pd.DataFrame
          The DataFrame with the latest values for the requested quarter
          for all columns; `dates` are the index and columns are a MultiIndex
          with sids at the top level and the dataset columns on the bottom.
      """
      zero_qtr_data_idx = zero_qtr_data.index
      requested_qtr_idx = pd.MultiIndex.from_arrays(
          [
              zero_qtr_data_idx.get_level_values(0),
              zero_qtr_data_idx.get_level_values(1),
              self.get_shifted_qtrs(
                  zeroth_quarter_idx.get_level_values(
                      NORMALIZED_QUARTERS,
                  ),
                  num_announcements,
              ),
          ],
          names=[
              zero_qtr_data_idx.names[0],
              zero_qtr_data_idx.names[1],
              SHIFTED_NORMALIZED_QTRS,
          ],
      )
      requested_qtr_data = stacked_last_per_qtr.loc[requested_qtr_idx]
      requested_qtr_data = requested_qtr_data.reset_index(
          SHIFTED_NORMALIZED_QTRS,
      )
      # Calculate the actual year/quarter being requested and add those in
      # as columns.
      (
          requested_qtr_data[FISCAL_YEAR_FIELD_NAME],
          requested_qtr_data[FISCAL_QUARTER_FIELD_NAME],
      ) = split_normalized_quarters(
          requested_qtr_data[SHIFTED_NORMALIZED_QTRS]
      )
      # Once we're left with just dates as the index, we can reindex by all
      # dates so that we have a value for each calendar date.
      return requested_qtr_data.unstack(SID_FIELD_NAME).reindex(dates)
  
imports: from abc import abstractmethod, abstractproperty
  import numpy
  import pandas
  from six import viewvalues
  from toolz import groupby
  from catalyst.lib.adjusted_array import AdjustedArray
  from catalyst.lib.adjustment import Datetime641DArrayOverwrite, Datetime64Overwrite, Float641DArrayOverwrite, Float64Multiply, Float64Overwrite
  from catalyst.pipeline.common import EVENT_DATE_FIELD_NAME, FISCAL_QUARTER_FIELD_NAME, FISCAL_YEAR_FIELD_NAME, SID_FIELD_NAME, TS_FIELD_NAME
  from catalyst.pipeline.loaders.base import PipelineLoader
  from catalyst.utils.numpy_utils import datetime64ns_dtype, float64_dtype
  from catalyst.pipeline.loaders.utils import ffill_across_cols, last_in_date_group
label_desc: Use image node_id 6 for calling the EarningsEstimatesLoader obj's underlying member method code with example usage: obj.get_requested_quarter_data(zero_qtr_data, zeroth_quarter_idx, stacked_last_per_qtr, num_announcements, dates) and returns: requested_qtr_data