def get_sub_dataframe(keys, by_position: true)
      return Daru::DataFrame.new({}) if keys == []

      keys = @index.pos(*keys) unless by_position

      sub_df = row_at(*keys)
      sub_df = sub_df.to_df.transpose if sub_df.is_a?(Daru::Vector)

      sub_df
    end
def get_sub_dataframe(keys, by_position: true)
      return Daru::DataFrame.new({}) if keys == []

      keys = @index.pos(*keys) unless by_position

      sub_df = row_at(*keys)
      sub_df = sub_df.to_df.transpose if sub_df.is_a?(Daru::Vector)

      sub_df
    end
Extract a dataframe given row indexes or positions
 @param keys [Array] can be positions (if by_position is true) or indexes (if by_position if false)
 @return [Daru::Dataframe]