<commit_before>require 'roo'

module Squib
  class Deck

    #@api private todo
    def csv(file: 'deck.csv', header: true)
      raise 'Not implemented!'
    end

    # Convenience method for pulling Excel data from `.xlsx` files
    #   Pulls the data into a Hash of arrays based on the columns. First row is assumed to be the header row. 
    #   See the example at {file:samples/excel.rb samples/excel.rb}. The accompanying Excel file is in the [source repository](https://github.com/andymeneely/squib/tree/master/samples)
    #
    # @param file: [String] the file to open. Must end in `.xlsx`. Opens relative to the current directory.
    # @param sheet: [Integer] The zero-based index of the sheet from which to read.
    # @api public
    def xlsx(opts = {})
      opts = needs(opts, [:file, :sheet])
      s = Roo::Excelx.new(opts[:file])
      s.default_sheet = s.sheets[opts[:sheet]]
      data = {}<commit_msg>Don't need this for now<commit_after>require 'roo'

module Squib
  class Deck

    # Convenience method for pulling Excel data from `.xlsx` files
    #   Pulls the data into a Hash of arrays based on the columns. First row is assumed to be the header row. 
    #   See the example at {file:samples/excel.rb samples/excel.rb}. The accompanying Excel file is in the [source repository](https://github.com/andymeneely/squib/tree/master/samples)
    #
    # @param file: [String] the file to open. Must end in `.xlsx`. Opens relative to the current directory.
    # @param sheet: [Integer] The zero-based index of the sheet from which to read.
    # @api public
    def xlsx(opts = {})
      opts = needs(opts, [:file, :sheet])
      s = Roo::Excelx.new(opts[:file])
      s.default_sheet = s.sheets[opts[:sheet]]
      data = {}
{'fraction_non_alphanumeric': 0.10990269032627362, 'fraction_numerical': 0.0, 'mean_word_length': 3.0556844547563804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4972217', 'n_tokens_mistral': 560, 'n_tokens_neox': 544, 'n_words': 204}