类 Series
- java.lang.Object
-
- org.meteoinfo.dataframe.Series
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Seriesequal(Number v)EqualSeriesequal(String v)EqualArraygetData()Get data arrayIndexgetIndex()Get indexObjectgetIndexValue(int i)Get a index valueStringgetName()Get nameObjectgetValue(int i)Get a data valueObjectgetValueByIndex(Object idxValue)Get value by indexSeriesgetValueByIndex(List idxValues)Get values by indexSeriesgetValueByIndex_bak(List idxValues)Get values by indexSeriesgetValues(List<Integer> ii)Get valuesSeriesgetValues(Range range)Get valuesSeriesgreaterThan(Number v)Greater thenSeriesgreaterThanOrEqual(Number v)Greater then or equalSeriesGroupBygroupBy()Group the series rows using the specified key function.SeriesGroupBygroupBy(String tStr)Group by time string - DateTimeIndexSeriesGroupBygroupBy(KeyFunction function)Group the series rows using the specified key function.SeriesGroupBygroupBy(TimeFunction function)Group the series rows using the specified time function.Stringhead(int n)Convert to string - headbooleanisEmpty()Get if the series contains no dataIteratoriterator()ListIterator<List<Object>>iterrows()SerieslessThan(Number v)Less thenSerieslessThanOrEqual(Number v)Less then or equalObjectmax()Compute the maximum of the numeric columns for each group or the entire series if the data is not grouped.Objectmean()Compute the mean of the numeric columns for each group or the entire series if the data is not grouped.Objectmin()Compute the minimum of the numeric columns for each group or the entire series if the data is not grouped.SeriesGroupByresample(String pStr)Group the series rows using the specified key function.SeriesGroupByresample(WindowFunction function)Group the series rows using the specified key function.voidsaveCSV(String fileName, String delimiter, String dateFormat, String floatFormat, boolean index)Save as CSV filevoidsetData(Array value)Set data arrayvoidsetIndex(List value)Set indexvoidsetIndex(Index value)Set indexvoidsetName(String value)Set namevoidsetValue(int i, Object v)Set a data valuevoidsetValue(Series s, Object v)Set data values by another boolean seriesintsize()Get sizeObjectstdDev()Compute the standard deviation of the numeric columns for each group or the entire series if the data is not grouped.Stringtail(int n)Convert to string - tailStringtoString()-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
-
-
-
方法详细资料
-
getData
public Array getData()
Get data array- 返回:
- Data array
-
setData
public void setData(Array value)
Set data array- 参数:
value- Data array
-
getIndex
public Index getIndex()
Get index- 返回:
- Index
-
setIndex
public void setIndex(Index value)
Set index- 参数:
value- Index
-
setIndex
public void setIndex(List value)
Set index- 参数:
value- Index value
-
getName
public String getName()
Get name- 返回:
- Name
-
setName
public void setName(String value)
Set name- 参数:
value- Name
-
isEmpty
public boolean isEmpty()
Get if the series contains no data- 返回:
- Boolean
-
getValue
public Object getValue(int i)
Get a data value- 参数:
i- Index- 返回:
- Data value
-
getValueByIndex
public Object getValueByIndex(Object idxValue)
Get value by index- 参数:
idxValue- Index value- 返回:
- Data value
-
setValue
public void setValue(int i, Object v)Set a data value- 参数:
i- Indexv- Data value
-
setValue
public void setValue(Series s, Object v)
Set data values by another boolean series- 参数:
s- Boolean seriesv- Data value
-
getValues
public Series getValues(List<Integer> ii)
Get values- 参数:
ii- index values- 返回:
- Result series
-
getValueByIndex
public Series getValueByIndex(List idxValues)
Get values by index- 参数:
idxValues- index values- 返回:
- Result series
-
getValueByIndex_bak
public Series getValueByIndex_bak(List idxValues)
Get values by index- 参数:
idxValues- index values- 返回:
- Result series
-
getIndexValue
public Object getIndexValue(int i)
Get a index value- 参数:
i- Index- 返回:
- Index value
-
iterrows
public ListIterator<List<Object>> iterrows()
-
size
public int size()
Get size- 返回:
- Size
-
groupBy
public SeriesGroupBy groupBy(KeyFunction function)
Group the series rows using the specified key function.- 参数:
function- the function to reduce rows to grouping keys- 返回:
- the grouping
-
groupBy
public SeriesGroupBy groupBy()
Group the series rows using the specified key function.- 返回:
- the grouping
-
groupBy
public SeriesGroupBy groupBy(TimeFunction function)
Group the series rows using the specified time function.- 参数:
function- the function to reduce rows to grouping keys- 返回:
- the grouping
-
groupBy
public SeriesGroupBy groupBy(String tStr)
Group by time string - DateTimeIndex- 参数:
tStr- Time string- 返回:
- The grouping
-
resample
public SeriesGroupBy resample(WindowFunction function)
Group the series rows using the specified key function.- 参数:
function- the function to reduce rows to grouping keys- 返回:
- the grouping
-
resample
public SeriesGroupBy resample(String pStr)
Group the series rows using the specified key function.- 参数:
pStr- Period string- 返回:
- the grouping
-
mean
public Object mean()
Compute the mean of the numeric columns for each group or the entire series if the data is not grouped.- 返回:
- Mean object
-
max
public Object max()
Compute the maximum of the numeric columns for each group or the entire series if the data is not grouped.- 返回:
- Maximum object
-
min
public Object min()
Compute the minimum of the numeric columns for each group or the entire series if the data is not grouped.- 返回:
- Minimum object
-
stdDev
public Object stdDev() throws InvalidRangeException
Compute the standard deviation of the numeric columns for each group or the entire series if the data is not grouped.- 返回:
- Minimum object
- 抛出:
InvalidRangeException
-
lessThanOrEqual
public Series lessThanOrEqual(Number v)
Less then or equal- 参数:
v- Value- 返回:
- Result series
-
greaterThanOrEqual
public Series greaterThanOrEqual(Number v)
Greater then or equal- 参数:
v- Value- 返回:
- Result series
-
head
public String head(int n)
Convert to string - head- 参数:
n- Head row number- 返回:
- The string
-
tail
public String tail(int n)
Convert to string - tail- 参数:
n- Tail row number- 返回:
- The string
-
saveCSV
public void saveCSV(String fileName, String delimiter, String dateFormat, String floatFormat, boolean index) throws IOException
Save as CSV file- 参数:
fileName- File namedelimiter- DelimiterdateFormat- Date format stringfloatFormat- Float format stringindex- If write index- 抛出:
IOException
-
-