<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def append_station(self, params, stationFile=''):
 """ Append a station to csv file return 0: All ok -2 - playlist not found -3 - negative number specified -4 - number not found -5: Error writing file -6: Error renaming file """

        if self.new_format:
            if stationFile:
                st_file = stationFile
            else:
                st_file = self.stations_file

            st_file, ret = self._get_playlist_abspath_from_data(st_file)
            if ret < -1:
                return ret
            try:
                with open(st_file, 'a') as cfgfile:
                    writter = csv.writer(cfgfile)
                    writter.writerow(params)
                return 0
            except:
                return -5
        else:
            self.stations.append([ params[0], params[1], params[2] ])
            self.dirty_playlist = True
            st_file, ret = self._get_playlist_abspath_from_data(stationFile)
            if ret < -1:
                return ret
            ret = self.save_playlist_file(st_file)
            if ret < 0:
                ret -= 4
            return ret