Trying to use the "Frequency analysis" tool in a script but getting errors.
The Online documentations for this tool:
processing.runalg('qgis:frequencyanalysis', input, fields, output)My Script:
path = "/Users/User/Desktop/"PIDs = QgsMapLayerRegistry.instance().mapLayersByName('Properties')[0]field = 'PropertyID'processing.runalg('qgis:frequencyanalysis', PIDs, field, path+'output')Have also tried:
processing.runalg('qgis:frequencyanalysis', PIDs, field, 'output')AND...
processing.runalg('qgis:frequencyanalysis', PIDs, field, None)My goal is to simply add a column to the "PIDs" table that for counts the number of times that each row's PID value is in the table.
e.g.
PID FREQUENCY3459 32309 20014 10187 1NULL NULL3459 32309 23459 3Any ideas why I'm getting the errors? I notice that Q's online documentation (above) has the second parameter in plural form, while I only have one field assigned.
Perhaps I am misinterpreting the intention of this tool, and it requires more than one field? Perhaps my above output example is not what the tool produces?
أكثر...
The Online documentations for this tool:
processing.runalg('qgis:frequencyanalysis', input, fields, output)My Script:
path = "/Users/User/Desktop/"PIDs = QgsMapLayerRegistry.instance().mapLayersByName('Properties')[0]field = 'PropertyID'processing.runalg('qgis:frequencyanalysis', PIDs, field, path+'output')Have also tried:
processing.runalg('qgis:frequencyanalysis', PIDs, field, 'output')AND...
processing.runalg('qgis:frequencyanalysis', PIDs, field, None)My goal is to simply add a column to the "PIDs" table that for counts the number of times that each row's PID value is in the table.
e.g.
PID FREQUENCY3459 32309 20014 10187 1NULL NULL3459 32309 23459 3Any ideas why I'm getting the errors? I notice that Q's online documentation (above) has the second parameter in plural form, while I only have one field assigned.
Perhaps I am misinterpreting the intention of this tool, and it requires more than one field? Perhaps my above output example is not what the tool produces?
أكثر...