<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_series(self):
 """ 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 """

        return pandas.Series(
            self.cdf, index=[numpy.nan] + list(self.bin_edges) + [numpy.nan])