StationTableData, TimeTableDatapublic class TableData extends DataTable
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected double |
missingValue |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addColumnData(int index,
String colName,
String dt,
List<Object> colData) |
Add column data
|
void |
addColumnData(String colName,
String dt,
List<Object> colData) |
Add column data
|
DataTable |
ave_DayOfWeek(List<DataColumn> cols,
String tColName) |
Average by day of week
|
DataTable |
ave_HourOfDay(List<DataColumn> cols,
String tColName) |
Average by hour of day
|
DataTable |
ave_Month(List<DataColumn> cols,
String tColName) |
Average month by month
|
DataTable |
ave_MonthOfYear(List<DataColumn> cols,
String tColName) |
Average monthly
|
DataTable |
ave_SeasonOfYear(List<DataColumn> cols,
String tColName) |
Average seasonal
|
DataTable |
ave_stdev(List<DataColumn> cols) |
Average data and calculate standard deviation
|
DataTable |
ave_Year(List<DataColumn> cols,
String tColName) |
Average year by year
|
DataTable |
average(List<DataColumn> cols) |
Average data
|
Object |
clone() |
Clone
|
void |
columnToDouble(String colName) |
Convert a data column to double data type
|
List<DataRow> |
getDataByDayOfWeek(int dow,
String tColName) |
Get data row list by day of week
|
List<DataRow> |
getDataByHour(int hour,
String tColName) |
Get data row list by hour
|
List<DataRow> |
getDataByMonth(int month,
String tColName) |
Get data row list by month
|
List<DataRow> |
getDataBySeason(String season,
String tColName) |
Get data row list by year
|
List<DataRow> |
getDataByYear(int year,
String tColName) |
Get data row list by year
|
List<DataRow> |
getDataByYearMonth(int year,
int month,
String tColName) |
Get data row list by year and month
|
List<DataRow> |
getDataByYearMonth(String yearMonth,
String tColName) |
Get data row list by year and month
|
List<DataColumn> |
getDataColumns() |
Get data columns
|
double |
getMissingValue() |
Get missing value
|
DataRow |
getRow(int idx) |
Get data row
|
String |
getTimeColName() |
Get time column name
|
List<Double> |
getValidColumnValues(List<DataRow> rows,
DataColumn col) |
Get column values
|
List<Double> |
getValidColumnValues(DataColumn col) |
Get column values
|
List<String> |
getYearMonths(String tColName) |
Get year months
|
List<Integer> |
getYears(String tColName) |
Get years
|
void |
join(TableData tableData,
String colName) |
Join data table
|
void |
join(TableData tableData,
String thisColName,
String otherColName) |
Join data table
|
void |
readASCIIFile(String fileName) |
Read data table from ASCII file
|
void |
readASCIIFile(String fileName,
String formatSpec) |
Read data table from ASCII file
|
void |
readASCIIFile(String fileName,
String delimiter,
int headerLines,
String formatSpec,
String encoding) |
Read data table from ASCII file
|
void |
readASCIIFile(String fileName,
List<DataColumn> dataColumns) |
Read data table from ASCII file
|
void |
removeColumn(String colName) |
Remove a column
|
void |
setColumnData(String colName,
List<Object> values) |
Set column data
|
void |
setMissingValue(double value) |
Set missing value
|
TableData |
sqlSelect(String expression) |
SQL select
|
DataTable |
statistics() |
Get average data table
|
DataTable |
statistics(List<DataColumn> dataColumns) |
Get average data table
|
DataTable |
sum(List<DataColumn> cols) |
Summary data
|
DataTable |
toSingleRowTable() |
Convert a multi rows data table to single row data table
|
DataTable |
toSingleRowTable(DataTable inTable) |
Convert a multi rows data table to single row data table
|
DataTable |
toSingleRowTable(DataTable inTable,
String firstColName,
String firstColValue) |
Convert a multi rows data table to single row data table
|
addColumn, addColumn, addColumn, addColumn, addColumnData, addColumnData, addColumnData, addRow, addRow, addRows, appendRow, avg, avg, cloneTable_Field, colSelect, findColumn, findColumns, findColumns_Index, getColumnCount, getColumnData, getColumnData, getColumnData, getColumnNames, getColumns, getRowCount, getRows, getRows, getRows, getTableName, getTag, getTotalCount, getValue, getValue, hasTimeColumn, head, isReadOnly, join, join, join, max, max, min, min, newRow, removeColumn, removeJoin, removeRow, removeRow, removeRows, renameColumn, renameColumn, renameColumn, saveAsASCIIFile, saveAsASCIIFile, saveAsASCIIFile_format, saveAsCSVFile, saveAsCSVFile, select, select, select, select, select, select, select, select, select, select, select, select, setColumnData, setReadOnly, setRows, setTableName, setTag, setValue, setValue, setValues, tail, toString, toString, toString, toStringpublic TableData()
public TableData(DataTable dataTable)
dataTable - The data tablepublic String getTimeColName()
public double getMissingValue()
public void setMissingValue(double value)
value - Missing valuepublic void addColumnData(String colName, String dt, List<Object> colData) throws Exception
addColumnData 在类中 DataTablecolName - Column namedt - Data type stringcolData - The column dataExceptionpublic void addColumnData(int index,
String colName,
String dt,
List<Object> colData)
throws Exception
index - Column indexcolName - Column namedt - Data type stringcolData - The column dataExceptionpublic void removeColumn(String colName)
colName - Column namepublic DataRow getRow(int idx)
idx - Indexpublic List<DataColumn> getDataColumns()
public List<Double> getValidColumnValues(DataColumn col)
col - The data columnpublic List<Double> getValidColumnValues(List<DataRow> rows, DataColumn col)
rows - The data row listcol - The data columnpublic void setColumnData(String colName, List<Object> values)
setColumnData 在类中 DataTablecolName - Column namevalues - Valuespublic void columnToDouble(String colName)
colName - The data column namepublic DataTable average(List<DataColumn> cols) throws Exception
cols - The data columnsExceptionpublic DataTable sum(List<DataColumn> cols) throws Exception
cols - The data columnsExceptionpublic DataTable ave_stdev(List<DataColumn> cols) throws Exception
cols - The data columnsExceptionpublic DataTable statistics(List<DataColumn> dataColumns) throws Exception
dataColumns - Exceptionpublic DataTable statistics() throws Exception
Exceptionpublic void readASCIIFile(String fileName, String formatSpec) throws FileNotFoundException, IOException, Exception
fileName - File nameformatSpec - Format specifiers stringFileNotFoundExceptionIOExceptionExceptionpublic void readASCIIFile(String fileName, String delimiter, int headerLines, String formatSpec, String encoding) throws FileNotFoundException, IOException, Exception
fileName - File namedelimiter - DelimiterheaderLines - Number of lines to skip at begining of the fileformatSpec - Format specifiers stringencoding - Fle encodingFileNotFoundExceptionIOExceptionExceptionpublic void readASCIIFile(String fileName, List<DataColumn> dataColumns) throws FileNotFoundException, IOException, Exception
fileName - File namedataColumns - Data columnsFileNotFoundExceptionIOExceptionExceptionpublic void readASCIIFile(String fileName) throws FileNotFoundException, IOException, Exception
fileName - File nameFileNotFoundExceptionIOExceptionExceptionpublic DataTable toSingleRowTable(DataTable inTable, String firstColName, String firstColValue) throws Exception
inTable - Input data table - multi rowsfirstColName - The new first column namefirstColValue - The new first column valueExceptionpublic DataTable toSingleRowTable(DataTable inTable) throws Exception
inTable - Input data table - multi rowsExceptionpublic DataTable toSingleRowTable() throws Exception
Exceptionpublic void join(TableData tableData, String colName)
tableData - The input table datacolName - The column name for joinpublic void join(TableData tableData, String thisColName, String otherColName)
tableData - The input table datathisColName - The column name for joinotherColName - The other column name for joinpublic List<Integer> getYears(String tColName)
tColName - Time column namepublic List<String> getYearMonths(String tColName)
tColName - Time column namepublic List<DataRow> getDataByYear(int year, String tColName)
year - The yeartColName - Time column namepublic List<DataRow> getDataBySeason(String season, String tColName)
season - The seasontColName - Time column namepublic List<DataRow> getDataByYearMonth(String yearMonth, String tColName)
yearMonth - The year and monthtColName - Time column namepublic List<DataRow> getDataByYearMonth(int year, int month, String tColName)
year - The yearmonth - The monthtColName - Time column namepublic List<DataRow> getDataByMonth(int month, String tColName)
month - The monthtColName - Time column namepublic List<DataRow> getDataByDayOfWeek(int dow, String tColName)
dow - Day of weektColName - Time column namepublic List<DataRow> getDataByHour(int hour, String tColName)
hour - The hourtColName - Time column namepublic DataTable ave_Year(List<DataColumn> cols, String tColName) throws Exception
cols - The data columnstColName - The time column nameExceptionpublic DataTable ave_Month(List<DataColumn> cols, String tColName) throws Exception
cols - The data columnstColName - Time column nameExceptionpublic DataTable ave_MonthOfYear(List<DataColumn> cols, String tColName) throws Exception
cols - The data columnstColName - Time column nameExceptionpublic DataTable ave_SeasonOfYear(List<DataColumn> cols, String tColName) throws Exception
cols - The data columnstColName - Time column nameExceptionpublic DataTable ave_DayOfWeek(List<DataColumn> cols, String tColName) throws Exception
cols - The data columnstColName - Time column nameExceptionpublic DataTable ave_HourOfDay(List<DataColumn> cols, String tColName) throws Exception
cols - The data columnstColName - Time column nameExceptionCopyright © 2019. All rights reserved.