org.encog.app.analyst.csv.filter
Class FilterCSV
java.lang.Object
org.encog.app.analyst.csv.basic.BasicFile
org.encog.app.analyst.csv.filter.FilterCSV
- All Implemented Interfaces:
- QuantTask
public class FilterCSV
- extends BasicFile
This class can be used to remove certain rows from a CSV. You can remove rows
where a specific field has a specific value
| Methods inherited from class org.encog.app.analyst.csv.basic.BasicFile |
appendSeparator, getColumnCount, getFormat, getInputFilename, getInputHeadings, getPrecision, getRecordCount, getReport, getReportInterval, getScript, isAnalyzed, isExpectInputHeaders, isProduceOutputHeaders, performBasicCounts, prepareOutputFile, readHeaders, reportDone, reportDone, requestStop, resetStatus, setAnalyzed, setColumnCount, setExpectInputHeaders, setInputFilename, setInputFormat, setInputHeadings, setPrecision, setProduceOutputHeaders, setRecordCount, setReport, setReportInterval, setScript, shouldStop, toString, updateStatus, updateStatus, validateAnalyzed, writeRow |
FilterCSV
public FilterCSV()
analyze
public final void analyze(File inputFile,
boolean headers,
CSVFormat format)
- Analyze the file.
- Parameters:
inputFile - The name of the input file.headers - True, if headers are expected.format - The format.
exclude
public final void exclude(int fieldNumber,
String fieldValue)
- Exclude rows where the specified field has the specified value.
- Parameters:
fieldNumber - The field number.fieldValue - The field value.
getExcluded
public final List<ExcludedField> getExcluded()
- Returns:
- A list of the fields and their values, that should be excluded.
getFilteredRowCount
public final int getFilteredRowCount()
- Returns:
- A count of the filtered rows. This is the resulting line count
for the output CSV.
process
public final void process(File outputFile)
- Process the input file.
- Parameters:
outputFile - The output file to write to.
Copyright © 2012. All Rights Reserved.