Class Series

  • All Implemented Interfaces:
    java.lang.Iterable


    public class Series
    extends java.lang.Object
    implements java.lang.Iterable
    • Constructor Summary

      Constructors 
      Constructor Description
      Series​(ucar.ma2.Array data, java.lang.String name)
      Constructor
      Series​(ucar.ma2.Array data, java.util.List idxValue, java.lang.String name)
      Constructor
      Series​(ucar.ma2.Array data, Index index, java.lang.String name)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Series equal​(java.lang.Number v)
      Equal
      ucar.ma2.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 getValues​(java.util.List<java.lang.Integer> ii)
      Get values
      Series getValues​(ucar.ma2.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 data frame if the data is not grouped.
      java.lang.Object mean​()
      Compute the mean of the numeric columns for each group or the entire data frame if the data is not grouped.
      java.lang.Object min​()
      Compute the minimum of the numeric columns for each group or the entire data frame if the data is not grouped.
      SeriesGroupBy resample​(java.lang.String pStr)
      Group the data frame rows using the specified key function.
      SeriesGroupBy resample​(WindowFunction function)
      Group the data frame rows using the specified key function.
      void setData​(ucar.ma2.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.String tail​(int n)
      Convert to string - tail
      java.lang.String toString​()  
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Series

        public Series​(ucar.ma2.Array data,
                      Index index,
                      java.lang.String name)
        Constructor
        Parameters:
        data - Data array
        index - Index
        name - Name
      • Series

        public Series​(ucar.ma2.Array data,
                      java.util.List idxValue,
                      java.lang.String name)
        Constructor
        Parameters:
        data - Data array
        idxValue - Index value
        name - Name
      • Series

        public Series​(ucar.ma2.Array data,
                      java.lang.String name)
        Constructor
        Parameters:
        data - Data array
        name - name
    • Method Detail

      • getData

        public ucar.ma2.Array getData​()
        Get data array
        Returns:
        Data array
      • setData

        public void setData​(ucar.ma2.Array value)
        Set data array
        Parameters:
        value - Data array
      • getIndex

        public Index getIndex​()
        Get index
        Returns:
        Index
      • setIndex

        public void setIndex​(Index value)
        Set index
        Parameters:
        value - Index
      • setIndex

        public void setIndex​(java.util.List value)
        Set index
        Parameters:
        value - Index value
      • getName

        public java.lang.String getName​()
        Get name
        Returns:
        Name
      • setName

        public void setName​(java.lang.String value)
        Set name
        Parameters:
        value - Name
      • isEmpty

        public boolean isEmpty​()
        Get if the series contains no data
        Returns:
        Boolean
      • getValue

        public java.lang.Object getValue​(int i)
        Get a data value
        Parameters:
        i - Index
        Returns:
        Data value
      • getValueByIndex

        public java.lang.Object getValueByIndex​(java.lang.Object idxValue)
        Get value by index
        Parameters:
        idxValue - Index value
        Returns:
        Data value
      • setValue

        public void setValue​(int i,
                             java.lang.Object v)
        Set a data value
        Parameters:
        i - Index
        v - Data value
      • setValue

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

        public Series getValues​(java.util.List<java.lang.Integer> ii)
        Get values
        Parameters:
        ii - index values
        Returns:
        Result series
      • getValues

        public Series getValues​(ucar.ma2.Range range)
        Get values
        Parameters:
        range - Range
        Returns:
        Result series
      • getValueByIndex

        public Series getValueByIndex​(java.util.List idxValues)
        Get values by index
        Parameters:
        idxValues - index values
        Returns:
        Result series
      • getIndexValue

        public java.lang.Object getIndexValue​(int i)
        Get a index value
        Parameters:
        i - Index
        Returns:
        Index value
      • iterator

        public java.util.Iterator iterator​()
        Specified by:
        iterator in interface java.lang.Iterable
      • iterrows

        public java.util.ListIterator<java.util.List<java.lang.Object>> iterrows​()
      • size

        public int size​()
        Get size
        Returns:
        Size
      • groupBy

        public SeriesGroupBy groupBy​(KeyFunction function)
        Group the series rows using the specified key function.
        Parameters:
        function - the function to reduce rows to grouping keys
        Returns:
        the grouping
      • groupBy

        public SeriesGroupBy groupBy​()
        Group the series rows using the specified key function.
        Returns:
        the grouping
      • groupBy

        public SeriesGroupBy groupBy​(TimeFunction function)
        Group the series rows using the specified time function.
        Parameters:
        function - the function to reduce rows to grouping keys
        Returns:
        the grouping
      • groupBy

        public SeriesGroupBy groupBy​(java.lang.String tStr)
        Group by time string - DateTimeIndex
        Parameters:
        tStr - Time string
        Returns:
        The grouping
      • resample

        public SeriesGroupBy resample​(WindowFunction function)
        Group the data frame rows using the specified key function.
        Parameters:
        function - the function to reduce rows to grouping keys
        Returns:
        the grouping
      • resample

        public SeriesGroupBy resample​(java.lang.String pStr)
        Group the data frame rows using the specified key function.
        Parameters:
        pStr - Period string
        Returns:
        the grouping
      • mean

        public java.lang.Object mean​()
        Compute the mean of the numeric columns for each group or the entire data frame if the data is not grouped.
        Returns:
        Mean object
      • max

        public java.lang.Object max​()
        Compute the maximum of the numeric columns for each group or the entire data frame if the data is not grouped.
        Returns:
        Maximum object
      • min

        public java.lang.Object min​()
        Compute the minimum of the numeric columns for each group or the entire data frame if the data is not grouped.
        Returns:
        Minimum object
      • equal

        public Series equal​(java.lang.Number v)
        Equal
        Parameters:
        v - Value
        Returns:
        Result series
      • lessThan

        public Series lessThan​(java.lang.Number v)
        Less then
        Parameters:
        v - Value
        Returns:
        Result series
      • lessThanOrEqual

        public Series lessThanOrEqual​(java.lang.Number v)
        Less then or equal
        Parameters:
        v - Value
        Returns:
        Result series
      • greaterThan

        public Series greaterThan​(java.lang.Number v)
        Greater then
        Parameters:
        v - Value
        Returns:
        Result series
      • greaterThanOrEqual

        public Series greaterThanOrEqual​(java.lang.Number v)
        Greater then or equal
        Parameters:
        v - Value
        Returns:
        Result series
      • head

        public java.lang.String head​(int n)
        Convert to string - head
        Parameters:
        n - Head row number
        Returns:
        The string
      • tail

        public java.lang.String tail​(int n)
        Convert to string - tail
        Parameters:
        n - Tail row number
        Returns:
        The string
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object