parsers/DataExporter.py
def exportCSV(self, multiData:object, format:str='csv') -> None:
        """Writes all data to CSV files.

        :param multiData:
        :param format:
        :return:
        """
        if self.settingsReader.check() and multiData.check():
            self.main.printToOut('Exporting data channels to {0}.'.format(format.upper()))
            saveDir = self.createDir()
            for type in multiData.multiData.keys():
                stacked = DataFrame()
                file = '{0}/{1}_appended.{2}'.format(saveDir, type, format)
                for (channel, id) in multiData.genChannelIds(channel=type):
                    #TODO switch to tagging mode if more than 1 id in settings
                    #data = multiData.getChannelAndTag(channel, id,   block='interval', format='dataframe',   ignoreEmpty=False)
                    data = multiData.getChannelById(channel, id,   format='dataframe')
                    stacked = stacked.append(data, sort=False)

                if format == "csv" and len(stacked):
                    stacked.to_csv(file, sep='\t', header=True, index=False, mode='w')


            #----
            self.main.printToOut('Done. Data blocks tagged.', status='ok')
            self.copyMeta()
Writes all data to CSV files.

        :param multiData:
        :param format:
        :return:
        
Writes all data to CSV files.
Writes all data to CSV files .
def exportCSV(self, multiData:object, format:str='csv') -> None:
        if self.settingsReader.check() and multiData.check():
            self.main.printToOut('Exporting data channels to {0}.'.format(format.upper()))
            saveDir = self.createDir()
            for type in multiData.multiData.keys():
                stacked = DataFrame()
                file = '{0}/{1}_appended.{2}'.format(saveDir, type, format)
                for (channel, id) in multiData.genChannelIds(channel=type):
                    data = multiData.getChannelById(channel, id,   format='dataframe')
                    stacked = stacked.append(data, sort=False)
                if format == "csv" and len(stacked):
                    stacked.to_csv(file, sep='\t', header=True, index=False, mode='w')
            self.main.printToOut('Done. Data blocks tagged.', status='ok')
            self.copyMeta()
def exportCSV ( self , multiData : object , format : str = 'csv' ) -> None : if self . settingsReader . check ( ) and multiData . check ( ) : self . main . printToOut ( 'Exporting data channels to {0}.' . format ( format . upper ( ) ) ) saveDir = self . createDir ( ) for type in multiData . multiData . keys ( ) : stacked = DataFrame ( ) file = '{0}/{1}_appended.{2}' . format ( saveDir , type , format ) for ( channel , id ) in multiData . genChannelIds ( channel = type ) : data = multiData . getChannelById ( channel , id , format = 'dataframe' ) stacked = stacked . append ( data , sort = False ) if format == "csv" and len ( stacked ) : stacked . to_csv ( file , sep = '\t' , header = True , index = False , mode = 'w' ) self . main . printToOut ( 'Done. Data blocks tagged.' , status = 'ok' ) self . copyMeta ( )
Writes all data to CSV files.
Writes all data to CSV files .
"""Writes all data to CSV files.

        :param multiData:
        :param format:
        :return:
        """ #TODO switch to tagging mode if more than 1 id in settings #data = multiData.getChannelAndTag(channel, id,   block='interval', format='dataframe',   ignoreEmpty=False) #----
None
self
multiData
object
None
format
str
None