red_amber 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.devcontainer/Dockerfile +75 -0
- data/.devcontainer/devcontainer.json +38 -0
- data/.devcontainer/onCreateCommand.sh +26 -0
- data/.rubocop.yml +3 -3
- data/CHANGELOG.md +102 -18
- data/Gemfile +1 -1
- data/README.ja.md +51 -32
- data/README.md +46 -30
- data/Rakefile +55 -0
- data/doc/DataFrame_Comparison.md +9 -13
- data/doc/DataFrame_Comparison_ja.md +61 -0
- data/doc/Dev_Containers.ja.md +290 -0
- data/doc/Dev_Containers.md +292 -0
- data/doc/qmd/examples_of_red_amber.qmd +4596 -0
- data/doc/qmd/red-amber.qmd +90 -0
- data/docker/Dockerfile +2 -2
- data/docker/Gemfile +1 -1
- data/docker/docker-compose.yml +1 -1
- data/docker/readme.md +5 -5
- data/lib/red_amber/data_frame_displayable.rb +1 -1
- data/lib/red_amber/data_frame_loadsave.rb +1 -1
- data/lib/red_amber/data_frame_selectable.rb +2 -2
- data/lib/red_amber/data_frame_variable_operation.rb +6 -6
- data/lib/red_amber/group.rb +287 -39
- data/lib/red_amber/subframes.rb +6 -6
- data/lib/red_amber/vector.rb +2 -1
- data/lib/red_amber/vector_selectable.rb +68 -35
- data/lib/red_amber/vector_string_function.rb +81 -13
- data/lib/red_amber/version.rb +1 -1
- data/red_amber.gemspec +3 -3
- metadata +15 -11
- data/docker/Gemfile.lock +0 -118
- data/docker/example +0 -86
- data/docker/notebook/examples_of_red_amber.ipynb +0 -8562
- data/docker/notebook/red-amber.ipynb +0 -188
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 7adbafa00c63857e5010442d39564d631ff4d7cac88bcc5dfdb520213f9c1606
         | 
| 4 | 
            +
              data.tar.gz: 1dad23038eb977b2db44b2a09f648863646cdcb34d21d53e5ac5b582f9a00648
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 59a7154c1c18f9020628524bd66fc4c82913fadea2b413d47231c39980a62f1883397215a494cfedbb8b2e258cea4a7310ffda72d8c2030859c0bc2e132d8d92
         | 
| 7 | 
            +
              data.tar.gz: 41b4ac8629511e16269d7642d4d129a1260b2de22b00335bbe2c2867a3d65c3ce7d9d4940cb474efa33d1839436e7a941f4c0c5e429f8f74eb1a309c68533a91
         | 
| @@ -0,0 +1,75 @@ | |
| 1 | 
            +
            # [Choice] debian-11, debian-10, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
         | 
| 2 | 
            +
            ARG VARIANT=ubuntu-22.04
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            FROM mcr.microsoft.com/devcontainers/base:${VARIANT}
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            # Set env for tracking that we're running in a devcontainer
         | 
| 7 | 
            +
            ENV DEVCONTAINER=true
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            RUN set -e; \
         | 
| 10 | 
            +
                apt-get update; \
         | 
| 11 | 
            +
                apt-get install -y \
         | 
| 12 | 
            +
                # To build Ruby
         | 
| 13 | 
            +
                autoconf \
         | 
| 14 | 
            +
                bison \
         | 
| 15 | 
            +
                rustc \
         | 
| 16 | 
            +
                libssl-dev \
         | 
| 17 | 
            +
                libyaml-dev \
         | 
| 18 | 
            +
                libreadline6-dev \
         | 
| 19 | 
            +
                zlib1g-dev \
         | 
| 20 | 
            +
                libgmp-dev \
         | 
| 21 | 
            +
                libncurses5-dev \
         | 
| 22 | 
            +
                libffi-dev \
         | 
| 23 | 
            +
                libgdbm6 \
         | 
| 24 | 
            +
                libgdbm-dev \
         | 
| 25 | 
            +
                libdb-dev \
         | 
| 26 | 
            +
                uuid-dev \
         | 
| 27 | 
            +
                # To install IRuby
         | 
| 28 | 
            +
                libczmq-dev \
         | 
| 29 | 
            +
                libzmq3-dev
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            # Install Apache Arrow
         | 
| 32 | 
            +
            ARG APACHE_ARROW_VERSION=13.0.0-1
         | 
| 33 | 
            +
            ARG arrow_deb_tmp=/tmp/apache-arrow-apt-source-latest.deb
         | 
| 34 | 
            +
            ARG arrow_apt_source=https://apache.jfrog.io/artifactory/arrow/ubuntu/pool/jammy/main/a/apache-arrow-apt-source/apache-arrow-apt-source_${APACHE_ARROW_VERSION}_all.deb
         | 
| 35 | 
            +
            RUN set -e; \
         | 
| 36 | 
            +
                apt-get update; \
         | 
| 37 | 
            +
                curl -sfSL -o ${arrow_deb_tmp} ${arrow_apt_source}; \
         | 
| 38 | 
            +
                apt-get install -y --no-install-recommends ${arrow_deb_tmp}; \
         | 
| 39 | 
            +
                rm -f ${arrow_deb_tmp}; \
         | 
| 40 | 
            +
                apt-get update; \
         | 
| 41 | 
            +
                apt-get install -y \
         | 
| 42 | 
            +
                libarrow-dev \
         | 
| 43 | 
            +
                libarrow-glib-dev \
         | 
| 44 | 
            +
                libarrow-dataset-dev \
         | 
| 45 | 
            +
                libarrow-flight-dev \
         | 
| 46 | 
            +
                libparquet-dev \
         | 
| 47 | 
            +
                libparquet-glib-dev \
         | 
| 48 | 
            +
                libgandiva-dev \
         | 
| 49 | 
            +
                libgandiva-glib-dev
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            # This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
         | 
| 52 | 
            +
            ARG USERNAME=vscode
         | 
| 53 | 
            +
            ARG USER_UID=1000
         | 
| 54 | 
            +
            ARG USER_GID=$USER_UID
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            USER $USERNAME
         | 
| 57 | 
            +
             | 
| 58 | 
            +
            # Install rbenv
         | 
| 59 | 
            +
            ARG RBENV_RUBY=3.2.2
         | 
| 60 | 
            +
            RUN set -e; \
         | 
| 61 | 
            +
                git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv; \
         | 
| 62 | 
            +
                echo 'eval "$($HOME/.rbenv/bin/rbenv init -)"' >> $HOME/.profile; \
         | 
| 63 | 
            +
                echo 'eval "$($HOME/.rbenv/bin/rbenv init -)"' >> $HOME/.bashrc; \
         | 
| 64 | 
            +
                git clone https://github.com/rbenv/ruby-build.git $HOME/.rbenv/plugins/ruby-build
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            # Install Ruby
         | 
| 67 | 
            +
            # Append `RUBY_CONFIGURE_OPTS=--disable-install-doc ` before rbenv to disable documents
         | 
| 68 | 
            +
            RUN set -e; \
         | 
| 69 | 
            +
                $HOME/.rbenv/bin/rbenv install --verbose $RBENV_RUBY; \
         | 
| 70 | 
            +
                $HOME/.rbenv/bin/rbenv global $RBENV_RUBY
         | 
| 71 | 
            +
             | 
| 72 | 
            +
            # Install IRuby
         | 
| 73 | 
            +
            RUN set -e; \
         | 
| 74 | 
            +
                $HOME/.rbenv/bin/rbenv exec gem install iruby; \
         | 
| 75 | 
            +
                $HOME/.rbenv/bin/rbenv exec iruby register --force
         | 
| @@ -0,0 +1,38 @@ | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
                "name": "RedAmber",
         | 
| 3 | 
            +
                "build": {
         | 
| 4 | 
            +
                    "dockerfile": "Dockerfile",
         | 
| 5 | 
            +
                    "cacheFrom": "ghcr.io/red-data-tools/red-amber"
         | 
| 6 | 
            +
                },
         | 
| 7 | 
            +
                "features": {
         | 
| 8 | 
            +
                    "ghcr.io/devcontainers/features/python:1": {
         | 
| 9 | 
            +
                        "installTools": true,
         | 
| 10 | 
            +
                        "installJupyterlab": true,
         | 
| 11 | 
            +
                        "version": "3.11"
         | 
| 12 | 
            +
                    },
         | 
| 13 | 
            +
                    // We don't use Ruby feature here
         | 
| 14 | 
            +
                    // "ghcr.io/devcontainers/features/ruby:1": {},
         | 
| 15 | 
            +
                    "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
         | 
| 16 | 
            +
                        "installTinyTex": true,
         | 
| 17 | 
            +
                        "version": "latest"
         | 
| 18 | 
            +
                    },
         | 
| 19 | 
            +
                    "ghcr.io/devcontainers/features/github-cli:1": {}
         | 
| 20 | 
            +
                },
         | 
| 21 | 
            +
                // VS Code extentions for Ruby
         | 
| 22 | 
            +
                "customizations": {
         | 
| 23 | 
            +
                    "vscode": {
         | 
| 24 | 
            +
                        "extensions": [
         | 
| 25 | 
            +
                            "rebornix.Ruby",
         | 
| 26 | 
            +
                            "shopify.ruby-lsp"
         | 
| 27 | 
            +
                        ]
         | 
| 28 | 
            +
                    }
         | 
| 29 | 
            +
                },
         | 
| 30 | 
            +
                // Use init process to deal with zombie process
         | 
| 31 | 
            +
                "init": true,
         | 
| 32 | 
            +
                // set TZ from local machine's environment defaulting to 'UTC' if not supplied.
         | 
| 33 | 
            +
                "containerEnv": {
         | 
| 34 | 
            +
                    "RUBYLIB": "/workspaces/red_amber/lib",
         | 
| 35 | 
            +
                    "TZ": "${localEnv:TZ:UTC}"
         | 
| 36 | 
            +
                },
         | 
| 37 | 
            +
                "onCreateCommand": ".devcontainer/onCreateCommand.sh"
         | 
| 38 | 
            +
            }
         | 
| @@ -0,0 +1,26 @@ | |
| 1 | 
            +
            #!/usr/bin/env bash
         | 
| 2 | 
            +
            set -e
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            # Explicitly set ownership of /workspaces to vscode:vscode
         | 
| 5 | 
            +
            # Because recent runner has uid=1001(runner), gid=999(docker)
         | 
| 6 | 
            +
            sudo chown -R $(id -un):$(id -un) /workspaces
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            # Install language and set timezone
         | 
| 9 | 
            +
            # You should change here if you use another
         | 
| 10 | 
            +
            sudo apt-get update
         | 
| 11 | 
            +
            sudo apt-get install -y language-pack-ja
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            echo 'export LANG=ja_JP.UTF-8' >> $HOME/.bashrc
         | 
| 14 | 
            +
            echo 'export LANG=ja_JP.UTF-8' >> $HOME/.profile
         | 
| 15 | 
            +
            echo 'export TZ=Asia/Tokyo' >> $HOME/.bashrc
         | 
| 16 | 
            +
            echo 'export TZ=Asia/Tokyo' >> $HOME/.profile
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            # Install HaranoAjiFonts
         | 
| 19 | 
            +
            mkdir -p $HOME/.fonts
         | 
| 20 | 
            +
            git clone https://github.com/trueroad/HaranoAjiFonts.git $HOME/.fonts/HaranoAjiFonts
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            # Install gems
         | 
| 23 | 
            +
            bundle install
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            # Create Jupyter Notebooks
         | 
| 26 | 
            +
            rake quarto:convert
         | 
    
        data/.rubocop.yml
    CHANGED
    
    | @@ -52,7 +52,7 @@ Lint/BinaryOperatorWithIdenticalOperands: | |
| 52 52 |  | 
| 53 53 | 
             
            Lint/Debugger:
         | 
| 54 54 | 
             
              Exclude:
         | 
| 55 | 
            -
                - ' | 
| 55 | 
            +
                - 'bin/example'
         | 
| 56 56 |  | 
| 57 57 | 
             
            # Need for test with empty block
         | 
| 58 58 | 
             
            # Offense count: 1
         | 
| @@ -225,7 +225,7 @@ Naming/PredicateName: | |
| 225 225 | 
             
            Rubycw/Rubycw:
         | 
| 226 226 | 
             
              Exclude:
         | 
| 227 227 | 
             
                - 'test/**/*'
         | 
| 228 | 
            -
                - ' | 
| 228 | 
            +
                - 'bin/example'
         | 
| 229 229 |  | 
| 230 230 | 
             
            # Offense count: 16
         | 
| 231 231 | 
             
            # This cop supports safe autocorrection (--autocorrect).
         | 
| @@ -242,7 +242,7 @@ Style/SlicingWithRange: | |
| 242 242 |  | 
| 243 243 | 
             
            Style/MixinUsage:
         | 
| 244 244 | 
             
              Exclude:
         | 
| 245 | 
            -
                - ' | 
| 245 | 
            +
                - 'bin/example'
         | 
| 246 246 |  | 
| 247 247 | 
             
            # Necessary to Vector < 0 element-wise comparison
         | 
| 248 248 | 
             
            # Offense count: 5
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,4 +1,88 @@ | |
| 1 | 
            -
            ## [0.5. | 
| 1 | 
            +
            ## [0.5.2] - 2023-09-01
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            Support Apache Arrow 13.0.0 .
         | 
| 4 | 
            +
            This version is compatible with Arrow 12.0.0 .
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            - Breaking change
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            - Bug fixes
         | 
| 9 | 
            +
              - Fix bundle install issue by install libyaml-devel (#280)
         | 
| 10 | 
            +
              - Fix ownership in devcontainer ci (#280)
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            - New features and improvements
         | 
| 13 | 
            +
              - Support Arrow 13.0.0 (#280)
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            - Documentation and Example
         | 
| 16 | 
            +
              - Add dataframe_comparison_ja (#281)
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            ## [0.5.1] - 2023-08-18
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            Docker environment is replaced by Dev Container,
         | 
| 21 | 
            +
            and Jupyter Notebooks will be created from qmd files.
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            - Breaking change
         | 
| 24 | 
            +
             | 
| 25 | 
            +
            - Bug fixes
         | 
| 26 | 
            +
              - Fix timestamp test to set TZ locally (#249)
         | 
| 27 | 
            +
              - Fix regexp for beginning of String (#251)
         | 
| 28 | 
            +
              - Fix loading bin/Gemfile locally in bin/jupyter script (#261)
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            - New features and improvements
         | 
| 31 | 
            +
              - Support sort and null_placement options in Vector#rank (#265)
         | 
| 32 | 
            +
              - Add Vector#find_substring method (#270)
         | 
| 33 | 
            +
              - Add Group#one method (#274)
         | 
| 34 | 
            +
              - Add Group#all and #any method (#274)
         | 
| 35 | 
            +
              - Add Group#median method (#274)
         | 
| 36 | 
            +
              - Add Group#count_uniq method (#274)
         | 
| 37 | 
            +
              - Introduce Dev Container environment
         | 
| 38 | 
            +
                - Introduce Devcontainer environment (#253)
         | 
| 39 | 
            +
                - Change lifecycle script from postCreate to onCreate (#253)
         | 
| 40 | 
            +
                - Move example to bin (#253)
         | 
| 41 | 
            +
                - Fix Python and Ruby versions in Dev Container (#254)
         | 
| 42 | 
            +
                - Add locale and timezone settings (#256)
         | 
| 43 | 
            +
                - Add quarto from devcontainer feature (#259)
         | 
| 44 | 
            +
                - Install HaranoAjiFonts as default Tex font (#259)
         | 
| 45 | 
            +
             | 
| 46 | 
            +
            - Refactoring
         | 
| 47 | 
            +
              - Rename boolean methods in VectorStringFunction (#263)
         | 
| 48 | 
            +
              - Refine Vector#inspect to show wheather chunked or not (#267)
         | 
| 49 | 
            +
              - Add an alias Group#count_all for #group_count (#274)
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            - Improve in tests/CI
         | 
| 52 | 
            +
              - Create rake commands for Notebook convert/test (#269)
         | 
| 53 | 
            +
              - Fix rubocop warning of forwarding arguments in assign_update (#269)
         | 
| 54 | 
            +
              - Use rake to start example script (#269)
         | 
| 55 | 
            +
              - Add test in Vector#rank to cover illegal rank option error (#271)
         | 
| 56 | 
            +
              - Add bundle install to Rakefile (#276)
         | 
| 57 | 
            +
              - Use Dockerfile to create dev container (#276)
         | 
| 58 | 
            +
              - Save image to ghcr in ci (#276)
         | 
| 59 | 
            +
             | 
| 60 | 
            +
            - Documentation and Example
         | 
| 61 | 
            +
              - YARD
         | 
| 62 | 
            +
                - Update Docker Environment (#245)
         | 
| 63 | 
            +
                - Refine jupyter notebook environment (#253)
         | 
| 64 | 
            +
                - Refine yard in Group aggregations (#274)
         | 
| 65 | 
            +
                - Fix yard of Vector#rank (#269)
         | 
| 66 | 
            +
                - Fix yard of Group (#269)
         | 
| 67 | 
            +
              - Notebook
         | 
| 68 | 
            +
                - Start source management for jupyter notebook by qmd (#259)
         | 
| 69 | 
            +
                - Don't create ipynb if it exists (#261)
         | 
| 70 | 
            +
                - Add Group methods (125 in total) (#269)
         | 
| 71 | 
            +
                - Add ArrowFunction (126 in total) (#269)
         | 
| 72 | 
            +
                - Add DataFrame#auto_cast (127 in total) (#269)
         | 
| 73 | 
            +
                - Update required version in examples notebook (#269)
         | 
| 74 | 
            +
                - Update examples_of_red_amber (#269)
         | 
| 75 | 
            +
                - Update red-amber.qmd (#269)
         | 
| 76 | 
            +
             | 
| 77 | 
            +
            - GitHub site
         | 
| 78 | 
            +
              - Fix broken link in README/README.ja by Viktorius Suwandi (#262)
         | 
| 79 | 
            +
              - Change description in gemspec (#254)
         | 
| 80 | 
            +
              - Add documents for Dev Container (#254)
         | 
| 81 | 
            +
             | 
| 82 | 
            +
            - Thanks
         | 
| 83 | 
            +
              - Viktorius Suwandi
         | 
| 84 | 
            +
             | 
| 85 | 
            +
            ## [0.5.0] - 2023-05-24
         | 
| 2 86 |  | 
| 3 87 | 
             
            - Breaking change
         | 
| 4 88 | 
             
              - Use non keyword argument in #sub_by_value (#219)
         | 
| @@ -61,7 +145,7 @@ | |
| 61 145 |  | 
| 62 146 | 
             
            - Bug fixes
         | 
| 63 147 | 
             
             - Fix Vector#modulo, #fdiv, #remainder (#203)
         | 
| 64 | 
            -
             | 
| 148 | 
            +
             | 
| 65 149 | 
             
            - New features and improvements
         | 
| 66 150 | 
             
              - Update SubFrames#take to return SubFrames (#212)
         | 
| 67 151 |  | 
| @@ -106,7 +190,7 @@ | |
| 106 190 | 
             
              - Fix Vector#rank when data is ChunkedArray (#198)
         | 
| 107 191 | 
             
              - Fix Vector element-wise functions with nil as scalar (#198)
         | 
| 108 192 | 
             
              - Support :force_order for all methods of join family (#199)
         | 
| 109 | 
            -
                - Supports :force_order option to force sorting after join for all #join familiy. | 
| 193 | 
            +
                - Supports :force_order option to force sorting after join for all #join familiy.
         | 
| 110 194 | 
             
                - This will valuable in some cases such as large dataframes.
         | 
| 111 195 | 
             
              - Ensure baseframe's schema for SubFrames (#200)
         | 
| 112 196 |  | 
| @@ -508,11 +592,11 @@ | |
| 508 592 | 
             
                  - Move binder support to heronshoes/docker-stacks repository.
         | 
| 509 593 | 
             
                  - Update README notebook on binder.
         | 
| 510 594 | 
             
                  - Add examples_of_RedAmber notebook on binder.
         | 
| 511 | 
            -
             | 
| 595 | 
            +
             | 
| 512 596 | 
             
                - Start to use discussions.
         | 
| 513 597 |  | 
| 514 598 | 
             
            - Thanks
         | 
| 515 | 
            -
             | 
| 599 | 
            +
             | 
| 516 600 | 
             
              - Kenta Murata
         | 
| 517 601 |  | 
| 518 602 | 
             
            ## [0.2.1] - 2022-09-07
         | 
| @@ -561,7 +645,7 @@ | |
| 561 645 | 
             
              - Update Jupyter Notebook `71 examples of RedAmber`
         | 
| 562 646 |  | 
| 563 647 | 
             
            - Thanks
         | 
| 564 | 
            -
             | 
| 648 | 
            +
             | 
| 565 649 | 
             
              - Kenta Murata
         | 
| 566 650 |  | 
| 567 651 | 
             
            ## [0.2.0] - 2022-08-15
         | 
| @@ -576,7 +660,7 @@ | |
| 576 660 | 
             
              - Remove optional `require` for rover (#55)
         | 
| 577 661 | 
             
                Fix DataFrame.new for argument with Rover::DataFrame.
         | 
| 578 662 | 
             
              - Fix occasional failure in CI (#59)
         | 
| 579 | 
            -
                Sometimes the CI test fails. I added -dev dependency | 
| 663 | 
            +
                Sometimes the CI test fails. I added -dev dependency
         | 
| 580 664 | 
             
                in Arrow install by apt, not doing in bundler.
         | 
| 581 665 |  | 
| 582 666 | 
             
              - Fix calling :take in V#[] (#56)
         | 
| @@ -594,7 +678,7 @@ | |
| 594 678 | 
             
                - Upgrade to Arrow 9.0.0 (#59)
         | 
| 595 679 | 
             
                - Add Vector#quantile method (#59)
         | 
| 596 680 | 
             
                  Arrow::QuantileOptions has supported in Arrow GLib 9.0.0 (ARROW-16623, Thanks!)
         | 
| 597 | 
            -
             | 
| 681 | 
            +
             | 
| 598 682 | 
             
                - Add Vector#quantiles (#62)
         | 
| 599 683 |  | 
| 600 684 | 
             
                - Add DataFrame#each_row (#56)
         | 
| @@ -605,7 +689,7 @@ | |
| 605 689 | 
             
                - Refine DataFrame.new to use pattern match
         | 
| 606 690 | 
             
                - Use pattern match in DataFrame#assign
         | 
| 607 691 | 
             
                - Use pattern match in DataFrame#rename
         | 
| 608 | 
            -
             | 
| 692 | 
            +
             | 
| 609 693 | 
             
              - Accept Array for renamer/assigner in #rename/#assign (#61)
         | 
| 610 694 | 
             
                - Accept assigner by Arrays in DataFrame#assign
         | 
| 611 695 | 
             
                - Accept renamer pairs by Arrays in DataFrame#rename
         | 
| @@ -620,15 +704,15 @@ | |
| 620 704 | 
             
                - Intorduce DataFrame#to_wide method
         | 
| 621 705 |  | 
| 622 706 | 
             
              - Others
         | 
| 623 | 
            -
             | 
| 707 | 
            +
             | 
| 624 708 | 
             
                - Add alias sort_index for array_sort_indices (#59)
         | 
| 625 709 | 
             
                - Enable :width option in DataFrame#to_s (#62)
         | 
| 626 710 | 
             
                - Add options to DataFrame#format_table (#62)
         | 
| 627 711 |  | 
| 628 712 | 
             
              - Update Documents
         | 
| 629 | 
            -
             | 
| 713 | 
            +
             | 
| 630 714 | 
             
                - Add Yard doc for some methods
         | 
| 631 | 
            -
             | 
| 715 | 
            +
             | 
| 632 716 | 
             
                - Update Jupyter notebook '61 Examples of Red Amber' (#65)
         | 
| 633 717 |  | 
| 634 718 | 
             
            ## [0.1.8] - 2022-08-04 (experimental)
         | 
| @@ -691,7 +775,7 @@ | |
| 691 775 | 
             
                  - Show nils.
         | 
| 692 776 | 
             
                  - Show data types.
         | 
| 693 777 | 
             
                - Refine documents to use new formatter output
         | 
| 694 | 
            -
             | 
| 778 | 
            +
             | 
| 695 779 | 
             
              - Simplify options of Vector functions (#46)
         | 
| 696 780 | 
             
                Vector functions with options use optional argument opt in previous code.
         | 
| 697 781 |  | 
| @@ -703,7 +787,7 @@ | |
| 703 787 | 
             
                - Add methods to Group
         | 
| 704 788 |  | 
| 705 789 | 
             
              - Move parquet and rover to development dependency (#49)
         | 
| 706 | 
            -
             | 
| 790 | 
            +
             | 
| 707 791 | 
             
              - Refine text in `DataFrame#to_iruby` (#40)
         | 
| 708 792 |  | 
| 709 793 | 
             
              - Add badges in Github site
         | 
| @@ -800,7 +884,7 @@ | |
| 800 884 | 
             
                - Add gem and status badges in README. (#42) [Patch by kojix2]
         | 
| 801 885 |  | 
| 802 886 | 
             
            - Thanks
         | 
| 803 | 
            -
             | 
| 887 | 
            +
             | 
| 804 888 | 
             
              - kojix2
         | 
| 805 889 |  | 
| 806 890 | 
             
            ## [0.1.5] - 2022-06-12 (experimental)
         | 
| @@ -841,7 +925,7 @@ | |
| 841 925 | 
             
                - Change to use DataFrame#map_indices in #[]
         | 
| 842 926 |  | 
| 843 927 | 
             
              - Add rounding functions with opts (#21)
         | 
| 844 | 
            -
                -  With options :mode and :n_digits | 
| 928 | 
            +
                -  With options :mode and :n_digits
         | 
| 845 929 | 
             
                -  :n_digits also can be specified with :multiple option in `Vector#round_to_multiple`
         | 
| 846 930 | 
             
                - `Vector#round`
         | 
| 847 931 | 
             
                - `Vector#ceil`
         | 
| @@ -909,7 +993,7 @@ | |
| 909 993 | 
             
                - Add example about TDR (#4)
         | 
| 910 994 | 
             
                - Separate README to create DataFrame and Vector documents (#12)
         | 
| 911 995 | 
             
                - Add DataFrame model concept image to README (#12)
         | 
| 912 | 
            -
             | 
| 996 | 
            +
             | 
| 913 997 | 
             
              - GitHub site
         | 
| 914 998 | 
             
                - Switched to use merge on GitHub (not to push merged master) (#1)
         | 
| 915 999 | 
             
                - Create lifetime issue #3 to show the goal of this project (#3)
         | 
| @@ -934,7 +1018,7 @@ | |
| 934 1018 |  | 
| 935 1019 | 
             
              - `Vector`
         | 
| 936 1020 | 
             
                - Add categorization functions
         | 
| 937 | 
            -
             | 
| 1021 | 
            +
             | 
| 938 1022 | 
             
                  This is an important step to support `slice` method and NA treatment features.
         | 
| 939 1023 | 
             
                  -  `is_finite`
         | 
| 940 1024 | 
             
                  -  `is_inf`
         | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.ja.md
    CHANGED
    
    | @@ -4,7 +4,7 @@ | |
| 4 4 | 
             
            [](https://github.com/red-data-tools/red_amber/actions/workflows/ci.yml)
         | 
| 5 5 | 
             
            [](https://codeclimate.com/github/heronshoes/red_amber/maintainability)
         | 
| 6 6 | 
             
            [](https://codeclimate.com/github/heronshoes/red_amber/test_coverage)
         | 
| 7 | 
            -
            [](https:// | 
| 7 | 
            +
            [](https://red-data-tools.github.io/red_amber/)
         | 
| 8 8 | 
             
            [](https://github.com/red-data-tools/red_amber/discussions)
         | 
| 9 9 |  | 
| 10 10 | 
             
            Rubyistのためのデータフレームライブラリ.
         | 
| @@ -17,29 +17,37 @@ Rubyistのためのデータフレームライブラリ. | |
| 17 17 |  | 
| 18 18 | 
             
            
         | 
| 19 19 |  | 
| 20 | 
            +
            ## 概要
         | 
| 21 | 
            +
            * RedAmberはRubyで書かれたデータフレームライブラリです。[Apache Arrow](https://arrow.apache.org/)の列指向データフォーマットを扱うことができます。
         | 
| 22 | 
            +
            * Rubyらしいブロックやコレクションを使って、Rubyらしい書き方でデータフレームの操作ができることを目指しています。
         | 
| 23 | 
            +
            * このリポジトリは[開発コンテナ(Dev Container)](https://containers.dev/)をサポートしているので、RedAmberの操作が容易に[試せます](doc/Dev_Containers.ja.md)。
         | 
| 24 | 
            +
            * [使用例が豊富なドキュメント](https://red-data-tools.github.io/red_amber/)と、127項目の主な操作例を記載したJupyter Notebookドキュメントがあります。
         | 
| 25 | 
            +
             | 
| 20 26 | 
             
            ## 必要な環境
         | 
| 21 27 | 
             
            ### Ruby
         | 
| 22 28 | 
             
            - Ruby 3.0 以上.
         | 
| 23 29 |  | 
| 24 30 | 
             
            ### ライブラリ
         | 
| 25 31 | 
             
            ```ruby
         | 
| 26 | 
            -
            gem 'red-arrow',   ' | 
| 27 | 
            -
             | 
| 28 | 
            -
            gem 'red- | 
| 32 | 
            +
            gem 'red-arrow',   '>= 12.0.0' # お使いの環境に合わせた Apache Arrow が必要です
         | 
| 33 | 
            +
                                           # 下記のインストールを参照してください
         | 
| 34 | 
            +
            gem 'red-arrow-numo-narray'    # 必要に応じて。Numo::NArray との連携またはランダムサンプリングが必要な場合。
         | 
| 35 | 
            +
            gem 'red-parquet', '>= 12.0.0' # 必要に応じて。Parquet の入出力が必要な場合。
         | 
| 36 | 
            +
            gem 'red-datasets-arrow'       # 必要に応じて。Red Datasets を利用する場合。
         | 
| 29 37 | 
             
            gem 'red-arrow-activerecord'   # 必要に応じて。Active Record とのデータ交換が必要な場合。
         | 
| 30 | 
            -
            gem 'rover-df', | 
| 38 | 
            +
            gem 'rover-df',                # 必要に応じて。Rover::DataFrame に対する入出力が必要な場合。
         | 
| 31 39 | 
             
            ```
         | 
| 32 40 |  | 
| 33 41 | 
             
            ## インストール
         | 
| 34 42 |  | 
| 35 43 | 
             
            RedAmberをインストールする前に、下記のライブラリのインストールが必要です。
         | 
| 36 44 |  | 
| 37 | 
            -
            - Apache Arrow ( | 
| 38 | 
            -
            - Apache Arrow GLib ( | 
| 39 | 
            -
            - Apache Parquet GLib ( | 
| 45 | 
            +
            - Apache Arrow (>= 12.0.0)
         | 
| 46 | 
            +
            - Apache Arrow GLib (>= 12.0.0)
         | 
| 47 | 
            +
            - Apache Parquet GLib (>= 12.0.0)  # Parquetの入出力が必要な場合。
         | 
| 40 48 |  | 
| 41 49 | 
             
            環境ごとの詳しいインストール方法は、 [Apache Arrow install document](https://arrow.apache.org/install/) を参照してください。
         | 
| 42 | 
            -
             | 
| 50 | 
            +
             | 
| 43 51 | 
             
              - Ubuntuの場合の最低限必要なインストール例:
         | 
| 44 52 |  | 
| 45 53 | 
             
                  ```
         | 
| @@ -48,53 +56,61 @@ RedAmberをインストールする前に、下記のライブラリのインス | |
| 48 56 | 
             
                  wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
         | 
| 49 57 | 
             
                  sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
         | 
| 50 58 | 
             
                  sudo apt update
         | 
| 51 | 
            -
                  sudo apt install -y -V libarrow-dev
         | 
| 52 | 
            -
                  sudo apt install -y -V libarrow-glib-dev
         | 
| 59 | 
            +
                  sudo apt install -y -V libarrow-dev libarrow-glib-dev
         | 
| 53 60 | 
             
                  ```
         | 
| 54 61 |  | 
| 55 62 | 
             
              - Fedora 39 (Rawhide)の場合:
         | 
| 56 63 |  | 
| 57 64 | 
             
                  ```
         | 
| 58 65 | 
             
                  sudo dnf update
         | 
| 59 | 
            -
                  sudo dnf -y install gcc-c++ libarrow-devel libarrow-glib-devel ruby-devel
         | 
| 66 | 
            +
                  sudo dnf -y install gcc-c++ libarrow-devel libarrow-glib-devel ruby-devel libyaml-devel
         | 
| 60 67 | 
             
                  ```
         | 
| 61 68 |  | 
| 62 69 | 
             
              - macOS の場合は、Homebrewを使用する:
         | 
| 63 70 |  | 
| 64 71 | 
             
                  ```
         | 
| 65 | 
            -
                  brew install apache-arrow
         | 
| 66 | 
            -
                  brew install apache-arrow-glib
         | 
| 72 | 
            +
                  brew install apache-arrow apache-arrow-glib
         | 
| 67 73 | 
             
                  ```
         | 
| 68 74 |  | 
| 69 75 | 
             
            Apache Arrowがインストールできたら、下記の行をGemfileに追加してください:
         | 
| 70 76 |  | 
| 71 77 | 
             
            ```ruby
         | 
| 72 | 
            -
            gem 'red-arrow',   ' | 
| 78 | 
            +
            gem 'red-arrow',   '>= 12.0.0'
         | 
| 73 79 | 
             
            gem 'red_amber'
         | 
| 74 | 
            -
            gem 'red- | 
| 75 | 
            -
            gem 'red- | 
| 76 | 
            -
            gem 'red-arrow | 
| 80 | 
            +
            gem 'red-arrow-numo-narray'    # 必要に応じて。Numo::NArray との連携またはランダムサンプリングが必要な場合。
         | 
| 81 | 
            +
            gem 'red-parquet', '>= 12.0.0' # 必要に応じて。Parquetの入出力が必要な場合。
         | 
| 82 | 
            +
            gem 'red-datasets-arrow'       # 必要に応じて。Red Datasets を利用する場合。
         | 
| 77 83 | 
             
            gem 'red-arrow-activerecord'   # 必要に応じて。Active Record とのデータ交換が必要な場合。
         | 
| 78 | 
            -
            gem 'rover-df', | 
| 84 | 
            +
            gem 'rover-df',                # 必要に応じて。Rover::DataFrameに対する入出力が必要な場合。
         | 
| 79 85 | 
             
            ```
         | 
| 80 86 |  | 
| 81 87 | 
             
            `bundle install`とするか、または `gem install red_amber`としてインストールしてください。
         | 
| 82 88 |  | 
| 89 | 
            +
            ## Development Containersによる開発環境
         | 
| 90 | 
            +
             | 
| 91 | 
            +
            このリポジトリは [開発コンテナ(Dev Container)](https://containers.dev/)をサポートしています。
         | 
| 92 | 
            +
            これを使うと、ローカルの環境を変更することなく、RedAmberに必要なツール一式を含んだ環境を準備することができます。この環境には、Ruby、Apache Arrow、RedAmberのソースツリー、GitHub CI、サンプルデータセット、IRubyカーネルを含んだJupyter Labなどが含まれています。
         | 
| 93 | 
            +
             | 
| 94 | 
            +
            RedAmber用のDev Containerは、`.devcontainer` ディレクトリに必要な設定が書かれています。
         | 
| 95 | 
            +
            使用例は、[開発コンテナ(Development Containers)の利用](doc/Dev_Containers.ja.md)をご参照ください。
         | 
| 96 | 
            +
             | 
| 83 97 | 
             
            ## Docker イメージと Jupyter Notebook
         | 
| 84 98 |  | 
| 99 | 
            +
            (注:将来削除される可能性があります。上記のDev Containerをご活用ください。)
         | 
| 100 | 
            +
             | 
| 85 101 | 
             
            このリポジトリの`docker` フォルダーから Docker コンテナ環境を生成できます。リポジトリをクローンしてから、dockerフォルダーにある [readme](docker/readme.md) を参照してください。その環境では `docker/notebook` フォルダーにある Jupyter Notebookイメージを試用できます。
         | 
| 86 102 |  | 
| 87 | 
            -
            このREADMEの内容をネットワーク上のJupyter Notebookでインタラクティブに試用することも出来ます。 [Binder](https://mybinder.org/v2/gh/heronshoes/docker-stacks/RedAmber-binder?filepath=red-amber.ipynb). | 
| 103 | 
            +
            このREADMEの内容をネットワーク上のJupyter Notebookでインタラクティブに試用することも出来ます。 [Binder](https://mybinder.org/v2/gh/heronshoes/docker-stacks/RedAmber-binder?filepath=red-amber.ipynb).
         | 
| 88 104 | 
             
            [](https://mybinder.org/v2/gh/heronshoes/docker-stacks/RedAmber-binder?filepath=red-amber.ipynb)
         | 
| 89 105 |  | 
| 90 106 | 
             
            Jupyter Notebookの環境を含めた他の多くのデータ処理用のライブラリーとともにRedAmberもパッケージングされたDocker Imageとして、[RubyData Docker Stacks](https://github.com/RubyData/docker-stacks) が利用できます(Thanks to Kenta Murata).
         | 
| 91 107 |  | 
| 92 108 | 
             
            ## 他のデータフレームライブラリとの比較表
         | 
| 93 109 |  | 
| 94 | 
            -
            RedAmberの基本的な機能をPython | 
| 110 | 
            +
            RedAmberの基本的な機能をPython
         | 
| 95 111 | 
             
            [pandas](https://pandas.pydata.org/) や
         | 
| 96 112 | 
             
            R [Tidyverse](https://www.tidyverse.org/) や
         | 
| 97 | 
            -
            Julia [ | 
| 113 | 
            +
            Julia [DataFrames](https://dataframes.juliadata.org/stable/) と比較した表は [DataFrame_Comparison_ja.md](doc/DataFrame_Comparison_ja.md) にあります(Thanks to Benson Muite).
         | 
| 98 114 |  | 
| 99 115 | 
             
            ## `RedAmber`のデータフレーム
         | 
| 100 116 |  | 
| @@ -211,21 +227,23 @@ starwars | |
| 211 227 | 
             
            より詳しいデータフレームの使用例については、[DataFrame.md](doc/DataFrame.md) をご参照ください。
         | 
| 212 228 |  | 
| 213 229 |  | 
| 214 | 
            -
            ### 1次元のデータを保持する `Vector` | 
| 230 | 
            +
            ### 1次元のデータを保持する `Vector`
         | 
| 215 231 |  | 
| 216 232 | 
             
            クラス`RedAmber::Vector` はデータフレームの中の列方向に格納された1次元のデータ列を保持します.
         | 
| 217 233 |  | 
| 218 234 | 
             
            より詳しい使用例については [Vector.md](doc/Vector.md) をご参照ください。
         | 
| 219 235 |  | 
| 220 | 
            -
            ## Jupyter notebook
         | 
| 221 236 |  | 
| 222 | 
            -
            Jupyter Notebook | 
| 223 | 
            -
            ([raw file](https://raw.githubusercontent.com/heronshoes/docker-stacks/RedAmber-binder/binder/examples_of_red_amber.ipynb)) があります。データのロードから各種のデータ処理まで100以上の使用例を集めています。[Binder](https://mybinder.org/v2/gh/heronshoes/docker-stacks/RedAmber-binder?filepath=examples_of_red_amber.ipynb). 
         | 
| 224 | 
            -
            [](https://mybinder.org/v2/gh/heronshoes/docker-stacks/RedAmber-binder?filepath=examples_of_red_amber.ipynb)で試すこともできます。
         | 
| 237 | 
            +
            ## Jupyter Notebook
         | 
| 225 238 |  | 
| 239 | 
            +
            このリポジトリでは [Quarto](https://quarto.org/) を使って、操作例を載せたJupyter Notebookのソースはqmd形式で保存し、gitの管理下に置いています。Notebookの生成は開発コンテナを使うと便利です。詳しくは[開発コンテナ(Development Containers)の利用](doc/Dev_Containers.ja.md)を利用して下さい。
         | 
| 226 240 |  | 
| 227 241 | 
             
            ## 開発
         | 
| 228 242 |  | 
| 243 | 
            +
            Dev Containersを利用してコンテナ上に開発環境を作成する方法がお勧めです。[開発コンテナ(Development Containers)の利用例](doc/Dev_Containers.ja.md)を参考にしてください。
         | 
| 244 | 
            +
             | 
| 245 | 
            +
            または、ローカル環境に必要なライブラリをインストールした上で、下記を実行するとテストが走ります。
         | 
| 246 | 
            +
             | 
| 229 247 | 
             
            ```shell
         | 
| 230 248 | 
             
            git clone https://github.com/red-data-tools/red_amber.git
         | 
| 231 249 | 
             
            cd red_amber
         | 
| @@ -233,19 +251,20 @@ bundle install | |
| 233 251 | 
             
            bundle exec rake test
         | 
| 234 252 | 
             
            ```
         | 
| 235 253 |  | 
| 236 | 
            -
            rake test | 
| 254 | 
            +
            RedAmberの開発では、`rake test` は必須ですが、`rake rubocop` をパスすることはコントリビュートの際に必須ではありません。このプロジェクトではコードの書き方の好みを尊重します。ただしマージの際に書き方を統一させていただくことがあります。
         | 
| 237 255 |  | 
| 238 256 | 
             
            ## コミュニティ
         | 
| 239 257 |  | 
| 240 258 | 
             
            このプロジェクトを支援して頂けると嬉しいです。支援の方法はいくつかあります。
         | 
| 241 259 |  | 
| 242 | 
            -
            - [discussions](https://github.com/heronshoes/red_amber/discussions) | 
| 243 | 
            -
              - Q and A | 
| 244 | 
            -
              -  | 
| 260 | 
            +
            - [discussions](https://github.com/heronshoes/red_amber/discussions)でお話ししましょう! [](https://github.com/red-data-tools/red_amber/discussions)
         | 
| 261 | 
            +
              - Q and Aや使用方法、豆知識などを見流ことができます。
         | 
| 262 | 
            +
              - 疑問に思っていることを質問できます。
         | 
| 245 263 | 
             
              - 新しいアイデアを共有する。アイデアはdiscussionからissueに昇格させて育てていくこともあります。漠然としたアイデアでもdiscussionから始めて大きくしていきましょう。
         | 
| 246 264 | 
             
            - [バグ報告や新しい機能の提案](https://github.com/red-data-tools/red_amber/issues)
         | 
| 247 265 | 
             
            - バグの修正や[プルリクエスト](https://github.com/red-data-tools/red_amber/pulls)
         | 
| 248 | 
            -
            -  | 
| 266 | 
            +
            - ドキュメントを修正したり、不明確なところを直したり、新しく追加しましょう。
         | 
| 267 | 
            +
            皆さんのご参加をお待ちしています。
         | 
| 249 268 |  | 
| 250 269 | 
             
            ## License
         | 
| 251 270 |  |