code: def to_series(self):
          
          return pandas.Series(
              self.cdf, index=[numpy.nan] + list(self.bin_edges) + [numpy.nan])
docs: Serialize the fit to a pandas.Series.
  
          The index on the series gives the bin edges and the valeus give the CDF.
  
          Returns
          -------
          pandas.Series