code: def first_valid_index(self):
          
          # It may be possible to incrementally check each partition, but this
          # computation is fairly cheap.
          def first_valid_index_builder(df):
              df.index = pandas.RangeIndex(len(df.index))
              return df.apply(lambda df: df.first_valid_index())
  
          func = self._build_mapreduce_func(first_valid_index_builder)
          # We get the minimum from each column, then take the min of that to get
          # first_valid_index. The `to_pandas()` here is just for a single value and
          # `squeeze` will convert it to a scalar.
          first_result = self._full_axis_reduce(0, func).min(axis=1).to_pandas().squeeze()
          return self.index[first_result]
docs: Returns index of first non-NaN/NULL value.
  
          Return:
              Scalar of index name.