<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _worst_case_generation(self, worst_case_scale_factors, modes):
 """ Define worst case generation time series for fluctuating and dispatchable generators. Parameters worst_case_scale_factors : dict Scale factors defined in config file 'config_timeseries.cfg'. Scale factors describe actual power to nominal power ratio of in worst-case scenarios. modes : list List with worst-cases to generate time series for. Can be 'feedin_case', 'load_case' or both. """


        self.timeseries.generation_fluctuating = pd.DataFrame(
            {'solar': [worst_case_scale_factors[
                           '{}_feedin_pv'.format(mode)] for mode in modes],
             'wind': [worst_case_scale_factors[
                          '{}_feedin_other'.format(mode)] for mode in modes]},
            index=self.timeseries.timeindex)

        self.timeseries.generation_dispatchable = pd.DataFrame(
            {'other': [worst_case_scale_factors[
                           '{}_feedin_other'.format(mode)] for mode in modes]},
            index=self.timeseries.timeindex)