class Pandas::Series

Public Instance Methods

[](*key) click to toggle source
Calls superclass method
# File lib/pandas/series.rb, line 5
def [](*key)
  if key.length == 1
    case key[0]
    when Array
      key[0] = PyCall::List.new(key[0])
    when Range
      case key[0].begin
      when String
        key[0] = key[0].begin ... key[0].end # force exclude-end
      end
    end
  end
  super
end
length() click to toggle source
# File lib/pandas/series.rb, line 36
def length
  size
end
monotonic?() click to toggle source
# File lib/pandas/series.rb, line 20
def monotonic?
  is_monotonic
end
monotonic_decreasing?() click to toggle source
# File lib/pandas/series.rb, line 24
def monotonic_decreasing?
  is_monotonic_decreasing
end
monotonic_increasing?() click to toggle source
# File lib/pandas/series.rb, line 28
def monotonic_increasing?
  is_monotonic_increasing
end
to_a() click to toggle source
# File lib/pandas/series.rb, line 40
def to_a
  Array.new(length) {|i| self.iloc[i] }
end
to_narray() click to toggle source
# File lib/pandas/series.rb, line 44
def to_narray
  to_numpy.to_narray
end
unique?() click to toggle source
# File lib/pandas/series.rb, line 32
def unique?
  is_unique
end