类 Series
- java.lang.Object
-
- org.meteoinfo.data.dataframe.Series
-
- 所有已实现的接口:
java.lang.Iterable
public class Series extends java.lang.Object implements java.lang.Iterable- 作者:
- Yaqiang Wang
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Seriesequal(java.lang.Number v)EqualArraygetData()Get data arrayIndexgetIndex()Get indexjava.lang.ObjectgetIndexValue(int i)Get a index valuejava.lang.StringgetName()Get namejava.lang.ObjectgetValue(int i)Get a data valuejava.lang.ObjectgetValueByIndex(java.lang.Object idxValue)Get value by indexSeriesgetValueByIndex(java.util.List idxValues)Get values by indexSeriesgetValueByIndex_bak(java.util.List idxValues)Get values by indexSeriesgetValues(java.util.List<java.lang.Integer> ii)Get valuesSeriesgetValues(Range range)Get valuesSeriesgreaterThan(java.lang.Number v)Greater thenSeriesgreaterThanOrEqual(java.lang.Number v)Greater then or equalSeriesGroupBygroupBy()Group the series rows using the specified key function.SeriesGroupBygroupBy(java.lang.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.java.lang.Stringhead(int n)Convert to string - headbooleanisEmpty()Get if the series contains no datajava.util.Iteratoriterator()java.util.ListIterator<java.util.List<java.lang.Object>>iterrows()SerieslessThan(java.lang.Number v)Less thenSerieslessThanOrEqual(java.lang.Number v)Less then or equaljava.lang.Objectmax()Compute the maximum of the numeric columns for each group or the entire series if the data is not grouped.java.lang.Objectmean()Compute the mean of the numeric columns for each group or the entire series if the data is not grouped.java.lang.Objectmin()Compute the minimum of the numeric columns for each group or the entire series if the data is not grouped.SeriesGroupByresample(java.lang.String pStr)Group the series rows using the specified key function.SeriesGroupByresample(WindowFunction function)Group the series rows using the specified key function.voidsaveCSV(java.lang.String fileName, java.lang.String delimiter, java.lang.String dateFormat, java.lang.String floatFormat, boolean index)Save as CSV filevoidsetData(Array value)Set data arrayvoidsetIndex(java.util.List value)Set indexvoidsetIndex(Index value)Set indexvoidsetName(java.lang.String value)Set namevoidsetValue(int i, java.lang.Object v)Set a data valuevoidsetValue(Series s, java.lang.Object v)Set data values by another boolean seriesintsize()Get sizejava.lang.ObjectstdDev()Compute the standard deviation of the numeric columns for each group or the entire series if the data is not grouped.java.lang.Stringtail(int n)Convert to string - tailjava.lang.StringtoString()
-
-
-
构造器详细资料
-
Series
public Series(Array data, Index index, java.lang.String name)
Constructor- 参数:
data- Data arrayindex- Indexname- Name
-
Series
public Series(Array data, java.util.List idxValue, java.lang.String name)
Constructor- 参数:
data- Data arrayidxValue- Index valuename- Name
-
Series
public Series(Array data, java.lang.String name)
Constructor- 参数:
data- Data arrayname- name
-
-
方法详细资料
-
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(java.util.List value)
Set index- 参数:
value- Index value
-
getName
public java.lang.String getName()
Get name- 返回:
- Name
-
setName
public void setName(java.lang.String value)
Set name- 参数:
value- Name
-
isEmpty
public boolean isEmpty()
Get if the series contains no data- 返回:
- Boolean
-
getValue
public java.lang.Object getValue(int i)
Get a data value- 参数:
i- Index- 返回:
- Data value
-
getValueByIndex
public java.lang.Object getValueByIndex(java.lang.Object idxValue)
Get value by index- 参数:
idxValue- Index value- 返回:
- Data value
-
setValue
public void setValue(int i, java.lang.Object v)Set a data value- 参数:
i- Indexv- Data value
-
setValue
public void setValue(Series s, java.lang.Object v)
Set data values by another boolean series- 参数:
s- Boolean seriesv- Data value
-
getValues
public Series getValues(java.util.List<java.lang.Integer> ii)
Get values- 参数:
ii- index values- 返回:
- Result series
-
getValueByIndex
public Series getValueByIndex(java.util.List idxValues)
Get values by index- 参数:
idxValues- index values- 返回:
- Result series
-
getValueByIndex_bak
public Series getValueByIndex_bak(java.util.List idxValues)
Get values by index- 参数:
idxValues- index values- 返回:
- Result series
-
getIndexValue
public java.lang.Object getIndexValue(int i)
Get a index value- 参数:
i- Index- 返回:
- Index value
-
iterator
public java.util.Iterator iterator()
- 指定者:
iterator在接口中java.lang.Iterable
-
iterrows
public java.util.ListIterator<java.util.List<java.lang.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(java.lang.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(java.lang.String pStr)
Group the series rows using the specified key function.- 参数:
pStr- Period string- 返回:
- the grouping
-
mean
public java.lang.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 java.lang.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 java.lang.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 java.lang.Object stdDev() throws InvalidRangeExceptionCompute the standard deviation of the numeric columns for each group or the entire series if the data is not grouped.- 返回:
- Minimum object
- 抛出:
InvalidRangeException
-
equal
public Series equal(java.lang.Number v)
Equal- 参数:
v- Value- 返回:
- Result series
-
lessThan
public Series lessThan(java.lang.Number v)
Less then- 参数:
v- Value- 返回:
- Result series
-
lessThanOrEqual
public Series lessThanOrEqual(java.lang.Number v)
Less then or equal- 参数:
v- Value- 返回:
- Result series
-
greaterThan
public Series greaterThan(java.lang.Number v)
Greater then- 参数:
v- Value- 返回:
- Result series
-
greaterThanOrEqual
public Series greaterThanOrEqual(java.lang.Number v)
Greater then or equal- 参数:
v- Value- 返回:
- Result series
-
head
public java.lang.String head(int n)
Convert to string - head- 参数:
n- Head row number- 返回:
- The string
-
tail
public java.lang.String tail(int n)
Convert to string - tail- 参数:
n- Tail row number- 返回:
- The string
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
saveCSV
public void saveCSV(java.lang.String fileName, java.lang.String delimiter, java.lang.String dateFormat, java.lang.String floatFormat, boolean index) throws java.io.IOExceptionSave as CSV file- 参数:
fileName- File namedelimiter- DelimiterdateFormat- Date format stringfloatFormat- Float format stringindex- If write index- 抛出:
java.io.IOException
-
-