Class: Pandas::Series
- Inherits:
-
Object
- Object
- Pandas::Series
- Defined in:
- lib/pandas/series.rb
Instance Method Summary collapse
- #[](*key) ⇒ Object
- #length ⇒ Object
- #monotonic? ⇒ Boolean
- #monotonic_decreasing? ⇒ Boolean
- #monotonic_increasing? ⇒ Boolean
- #to_a ⇒ Object
- #unique? ⇒ Boolean
Instance Method Details
#[](*key) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# 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 ⇒ Object
36 37 38 |
# File 'lib/pandas/series.rb', line 36 def length size end |
#monotonic? ⇒ Boolean
20 21 22 |
# File 'lib/pandas/series.rb', line 20 def monotonic? is_monotonic end |
#monotonic_decreasing? ⇒ Boolean
24 25 26 |
# File 'lib/pandas/series.rb', line 24 def monotonic_decreasing? is_monotonic_decreasing end |
#monotonic_increasing? ⇒ Boolean
28 29 30 |
# File 'lib/pandas/series.rb', line 28 def monotonic_increasing? is_monotonic_increasing end |
#to_a ⇒ Object
40 41 42 |
# File 'lib/pandas/series.rb', line 40 def to_a Array.new(length) {|i| self[i] } end |
#unique? ⇒ Boolean
32 33 34 |
# File 'lib/pandas/series.rb', line 32 def unique? is_unique end |