class Pandas::DataFrame

Public Instance Methods

[](key) click to toggle source
Calls superclass method
# File lib/pandas/data_frame.rb, line 5
def [](key)
  key = PyCall::List.new(key) if key.is_a?(Array)
  super
end
to_iruby_mimebundle(include: [], exclude: []) click to toggle source
# File lib/pandas/data_frame.rb, line 14
def to_iruby_mimebundle(include: [], exclude: [])
  include = ["text/html", "text/latex", "text/plain"] if include.empty?
  include -= exclude unless exclude.empty?
  include.map { |mime|
    data = case mime
           when "text/html"
             _repr_html_
           when "text/latex"
             _repr_latex_
           when "text/plain"
             if respond_to?(:_repr_pretty_)
               _repr_pretty_
             else
               __repr__
             end
           end
    [mime, data] if data
  }.compact.to_h
end
to_narray() click to toggle source
# File lib/pandas/data_frame.rb, line 10
def to_narray
  to_numpy.to_narray
end