类 Series

  • 所有已实现的接口:
    java.lang.Iterable

    public class Series
    extends java.lang.Object
    implements java.lang.Iterable
    作者:
    Yaqiang Wang
    • 构造器概要

      构造器 
      构造器 说明
      Series​(org.meteoinfo.ndarray.Array data, java.lang.String name)
      Constructor
      Series​(org.meteoinfo.ndarray.Array data, java.util.List idxValue, java.lang.String name)
      Constructor
      Series​(org.meteoinfo.ndarray.Array data, Index index, java.lang.String name)
      Constructor
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      Series equal​(java.lang.Number v)
      Equal
      Series equal​(java.lang.String v)
      Equal
      org.meteoinfo.ndarray.Array getData()
      Get data array
      Index getIndex()
      Get index
      java.lang.Object getIndexValue​(int i)
      Get a index value
      java.lang.String getName()
      Get name
      java.lang.Object getValue​(int i)
      Get a data value
      java.lang.Object getValueByIndex​(java.lang.Object idxValue)
      Get value by index
      Series getValueByIndex​(java.util.List idxValues)
      Get values by index
      Series getValueByIndex_bak​(java.util.List idxValues)
      Get values by index
      Series getValues​(java.util.List<java.lang.Integer> ii)
      Get values
      Series getValues​(org.meteoinfo.ndarray.Range range)
      Get values
      Series greaterThan​(java.lang.Number v)
      Greater then
      Series greaterThanOrEqual​(java.lang.Number v)
      Greater then or equal
      SeriesGroupBy groupBy()
      Group the series rows using the specified key function.
      SeriesGroupBy groupBy​(java.lang.String tStr)
      Group by time string - DateTimeIndex
      SeriesGroupBy groupBy​(KeyFunction function)
      Group the series rows using the specified key function.
      SeriesGroupBy groupBy​(TimeFunction function)
      Group the series rows using the specified time function.
      java.lang.String head​(int n)
      Convert to string - head
      boolean isEmpty()
      Get if the series contains no data
      java.util.Iterator iterator()  
      java.util.ListIterator<java.util.List<java.lang.Object>> iterrows()  
      Series lessThan​(java.lang.Number v)
      Less then
      Series lessThanOrEqual​(java.lang.Number v)
      Less then or equal
      java.lang.Object max()
      Compute the maximum of the numeric columns for each group or the entire series if the data is not grouped.
      java.lang.Object mean()
      Compute the mean of the numeric columns for each group or the entire series if the data is not grouped.
      java.lang.Object min()
      Compute the minimum of the numeric columns for each group or the entire series if the data is not grouped.
      SeriesGroupBy resample​(java.lang.String pStr)
      Group the series rows using the specified key function.
      SeriesGroupBy resample​(WindowFunction function)
      Group the series rows using the specified key function.
      void saveCSV​(java.lang.String fileName, java.lang.String delimiter, java.lang.String dateFormat, java.lang.String floatFormat, boolean index)
      Save as CSV file
      void setData​(org.meteoinfo.ndarray.Array value)
      Set data array
      void setIndex​(java.util.List value)
      Set index
      void setIndex​(Index value)
      Set index
      void setName​(java.lang.String value)
      Set name
      void setValue​(int i, java.lang.Object v)
      Set a data value
      void setValue​(Series s, java.lang.Object v)
      Set data values by another boolean series
      int size()
      Get size
      java.lang.Object stdDev()
      Compute the standard deviation of the numeric columns for each group or the entire series if the data is not grouped.
      java.lang.String tail​(int n)
      Convert to string - tail
      java.lang.String toString()  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • 从接口继承的方法 java.lang.Iterable

        forEach, spliterator
    • 构造器详细资料

      • Series

        public Series​(org.meteoinfo.ndarray.Array data,
                      Index index,
                      java.lang.String name)
        Constructor
        参数:
        data - Data array
        index - Index
        name - Name
      • Series

        public Series​(org.meteoinfo.ndarray.Array data,
                      java.util.List idxValue,
                      java.lang.String name)
        Constructor
        参数:
        data - Data array
        idxValue - Index value
        name - Name
      • Series

        public Series​(org.meteoinfo.ndarray.Array data,
                      java.lang.String name)
        Constructor
        参数:
        data - Data array
        name - name
    • 方法详细资料

      • getData

        public org.meteoinfo.ndarray.Array getData()
        Get data array
        返回:
        Data array
      • setData

        public void setData​(org.meteoinfo.ndarray.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 - Index
        v - Data value
      • setValue

        public void setValue​(Series s,
                             java.lang.Object v)
        Set data values by another boolean series
        参数:
        s - Boolean series
        v - Data value
      • getValues

        public Series getValues​(java.util.List<java.lang.Integer> ii)
        Get values
        参数:
        ii - index values
        返回:
        Result series
      • getValues

        public Series getValues​(org.meteoinfo.ndarray.Range range)
        Get values
        参数:
        range - Range
        返回:
        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 org.meteoinfo.ndarray.InvalidRangeException
        Compute the standard deviation of the numeric columns for each group or the entire series if the data is not grouped.
        返回:
        Minimum object
        抛出:
        org.meteoinfo.ndarray.InvalidRangeException
      • equal

        public Series equal​(java.lang.Number v)
        Equal
        参数:
        v - Value
        返回:
        Result series
      • equal

        public Series equal​(java.lang.String 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.IOException
        Save as CSV file
        参数:
        fileName - File name
        delimiter - Delimiter
        dateFormat - Date format string
        floatFormat - Float format string
        index - If write index
        抛出:
        java.io.IOException