From 9d4338669e16f258102d628d87a178ddde5603ed Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 19:17:01 +0530 Subject: [PATCH 01/12] DOC: Add Google Colab data loading section to io guide --- doc/source/user_guide/io.rst | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/doc/source/user_guide/io.rst b/doc/source/user_guide/io.rst index 070ad0bbe22ed..a3bd9160bc49e 100644 --- a/doc/source/user_guide/io.rst +++ b/doc/source/user_guide/io.rst @@ -167,8 +167,38 @@ dtype_backend : {"numpy_nullable", "pyarrow"}, defaults to NumPy backed DataFram dtypes if "pyarrow" is set. The dtype_backends are still experimental. + .. versionadded:: 2.0 - .. versionadded:: 2.0 + +Google Colab +^^^^^^^^^^^^ + +Google Colab provides several methods to load data for :func:`read_csv` and similar functions. + +File upload ++++++++++++ + +.. ipython:: python + + from google.colab import files + # uploaded = files.upload() # Interactive in Colab + import io + import pandas as pd + # df = pd.read_csv(io.BytesIO(uploaded['example.csv'])) + +Google Drive +++++++++++++ + +.. ipython:: python + + from google.colab import drive + drive.mount('/content/drive') + df = pd.read_csv('/content/drive/MyDrive/example.csv') + +See `Google Colab IO notebook `_. + + + engine : {``'c'``, ``'python'``, ``'pyarrow'``} Parser engine to use. The C and pyarrow engines are faster, while the python engine From 93239cd7b412ac679d12986b564f0d55470d9d34 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 19:20:38 +0530 Subject: [PATCH 02/12] Add Google Colab data loading section to io guide Explains files.upload() and drive.mount() integration with read_csv. References Colab IO notebook." --- 1.26.0 | 0 2.8.2 | 0 2023.3 | 0 conda | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 1.26.0 create mode 100644 2.8.2 create mode 100644 2023.3 create mode 100644 conda diff --git a/1.26.0 b/1.26.0 new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/2.8.2 b/2.8.2 new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/2023.3 b/2023.3 new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/conda b/conda new file mode 100644 index 0000000000000..e69de29bb2d1d From d54519b2812433519661656287183c7c6c2399da Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 20:43:22 +0530 Subject: [PATCH 03/12] DOC: Add CI workflow for downloading and setting up micromamba --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000000..e535ff19b1896 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +- name: Download micromamba (with retries) + shell: bash + run: | + set -euo pipefail + RETRIES=5 + URL="https://micromamba.snakepit.net/api/micromamba/linux-64/latest" # linux binary endpoint + OUT="$RUNNER_TEMP/micromamba.tar.bz2" + i=0 + until [ $i -ge $RETRIES ] + do + echo "Attempt $((i+1))..." + if curl -fSL "$URL" -o "$OUT"; then + echo "Downloaded micromamba" + break + fi + i=$((i+1)) + sleep $((i * 2)) + done + if [ ! -f "$OUT" ]; then + echo "Failed to download micromamba after $RETRIES attempts" + exit 1 + fi + mkdir -p "$RUNNER_TEMP/micromamba" + tar -xjf "$OUT" -C "$RUNNER_TEMP/micromamba" --strip-components=1 + export MAMBA_ROOT_PREFIX="$RUNNER_TEMP/micromamba-root" + mkdir -p "$MAMBA_ROOT_PREFIX" + echo "Adding micromamba to PATH" + echo "$RUNNER_TEMP/micromamba/bin" >> $GITHUB_PATH + +- name: Create env with micromamba + run: | + micromamba create -y -n ci-env python=3.10 + micromamba activate ci-env + micromamba install -y -n ci-env -c conda-forge From 61602d9b0887e7d4d2c755bd1eb7c885dc382214 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 21:03:11 +0530 Subject: [PATCH 04/12] DOC: Change micromamba version to v1 for stability in CI setup --- .github/actions/setup-conda/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml index a09ac1a4e5ffb..89dc02049f6d6 100644 --- a/.github/actions/setup-conda/action.yml +++ b/.github/actions/setup-conda/action.yml @@ -7,7 +7,7 @@ runs: using: composite steps: - name: Install ${{ inputs.environment-file }} - uses: mamba-org/setup-micromamba@v2 + uses: mamba-org/setup-micromamba@v1 # Changed from @v2 to @v1 for stability with: environment-file: ${{ inputs.environment-file }} environment-name: test @@ -19,4 +19,4 @@ runs: if: ${{ env.REMOVE_PYARROW == '1' }} run: | micromamba remove -y pyarrow - shell: bash -el {0} + shell: bash -el {0} \ No newline at end of file From d86732c9906a588ea46440a376f54e6a9d3a2082 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 21:33:22 +0530 Subject: [PATCH 05/12] DOC: Restore Conda setup action configuration --- .github/actions/setup-conda/{action.yml => actions.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/setup-conda/{action.yml => actions.yml} (100%) diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/actions.yml similarity index 100% rename from .github/actions/setup-conda/action.yml rename to .github/actions/setup-conda/actions.yml From 862653c398a115eaec6906e9cedf761d88037a59 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 21:35:54 +0530 Subject: [PATCH 06/12] DOC: Add micromamba URL to setup action for clarity --- .github/actions/setup-conda/actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-conda/actions.yml b/.github/actions/setup-conda/actions.yml index 89dc02049f6d6..2c823f9138c56 100644 --- a/.github/actions/setup-conda/actions.yml +++ b/.github/actions/setup-conda/actions.yml @@ -9,6 +9,7 @@ runs: - name: Install ${{ inputs.environment-file }} uses: mamba-org/setup-micromamba@v1 # Changed from @v2 to @v1 for stability with: + micromamba-url: https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-linux-64 environment-file: ${{ inputs.environment-file }} environment-name: test condarc-file: ci/.condarc From ad450c2a045e82a0ca2fc5043d9beb7d3e1e049d Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 21:42:50 +0530 Subject: [PATCH 07/12] DOC: Restore setup-conda action configuration --- .github/actions/setup-conda/{actions.yml => actions.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/setup-conda/{actions.yml => actions.yaml} (100%) diff --git a/.github/actions/setup-conda/actions.yml b/.github/actions/setup-conda/actions.yaml similarity index 100% rename from .github/actions/setup-conda/actions.yml rename to .github/actions/setup-conda/actions.yaml From e36e14394684ece37b2edefee99ee0b05a86dbe7 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 21:45:25 +0530 Subject: [PATCH 08/12] DOC: Reintroduce setup-conda action configuration --- .github/actions/setup-conda/{actions.yaml => action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/setup-conda/{actions.yaml => action.yml} (100%) diff --git a/.github/actions/setup-conda/actions.yaml b/.github/actions/setup-conda/action.yml similarity index 100% rename from .github/actions/setup-conda/actions.yaml rename to .github/actions/setup-conda/action.yml From 12953fc6dfa508c968dd13a40eb27d2b195df846 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 21:48:00 +0530 Subject: [PATCH 09/12] DOC: Fix indentation for micromamba URL in setup-conda action --- .github/actions/setup-conda/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml index 2c823f9138c56..db119e1bb6dfb 100644 --- a/.github/actions/setup-conda/action.yml +++ b/.github/actions/setup-conda/action.yml @@ -9,7 +9,7 @@ runs: - name: Install ${{ inputs.environment-file }} uses: mamba-org/setup-micromamba@v1 # Changed from @v2 to @v1 for stability with: - micromamba-url: https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-linux-64 + micromamba-url: https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-linux-64 environment-file: ${{ inputs.environment-file }} environment-name: test condarc-file: ci/.condarc From 33aa3db3af8f284529526160506f18fe86895f1e Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 21:50:28 +0530 Subject: [PATCH 10/12] DOC: Add setup-conda action for Conda environment management --- .github/actions/setup-conda/{action.yml => action.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/setup-conda/{action.yml => action.yaml} (100%) diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yaml similarity index 100% rename from .github/actions/setup-conda/action.yml rename to .github/actions/setup-conda/action.yaml From 8c2b955ede60b4092d4c18a40a86d10c81603cc8 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 22:12:23 +0530 Subject: [PATCH 11/12] DOC: Update Conda setup action to include cache-buster for improved caching --- .github/actions/setup-conda/{action.yaml => action.yml} | 0 .github/workflows/docbuild-and-upload.yml | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) rename .github/actions/setup-conda/{action.yaml => action.yml} (100%) diff --git a/.github/actions/setup-conda/action.yaml b/.github/actions/setup-conda/action.yml similarity index 100% rename from .github/actions/setup-conda/action.yaml rename to .github/actions/setup-conda/action.yml diff --git a/.github/workflows/docbuild-and-upload.yml b/.github/workflows/docbuild-and-upload.yml index 114f7b942cf05..7e01f00c7383a 100644 --- a/.github/workflows/docbuild-and-upload.yml +++ b/.github/workflows/docbuild-and-upload.yml @@ -42,7 +42,8 @@ jobs: - name: Set up Conda uses: ./.github/actions/setup-conda - + with: + cache-buster: ${{ github.sha }} - name: Build Pandas uses: ./.github/actions/build_pandas From 1a288f5e1dc153c612cc5fdf5bf039d0a7ad0030 Mon Sep 17 00:00:00 2001 From: Sanchit Rishi Date: Thu, 11 Dec 2025 22:17:36 +0530 Subject: [PATCH 12/12] DOC: Update setup-micromamba action to v2 for improved stability and functionality --- .github/actions/setup-conda/action.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml index db119e1bb6dfb..9439d83fc0079 100644 --- a/.github/actions/setup-conda/action.yml +++ b/.github/actions/setup-conda/action.yml @@ -1,13 +1,15 @@ name: Set up Conda environment + inputs: environment-file: description: Conda environment file to use. default: environment.yml + runs: using: composite steps: - name: Install ${{ inputs.environment-file }} - uses: mamba-org/setup-micromamba@v1 # Changed from @v2 to @v1 for stability + uses: mamba-org/setup-micromamba@v2 with: micromamba-url: https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-linux-64 environment-file: ${{ inputs.environment-file }} @@ -15,9 +17,11 @@ runs: condarc-file: ci/.condarc cache-environment: true cache-downloads: true + # avoid aggressive post-cleanup that can trigger JSON issues + post-cleanup: none - name: Uninstall pyarrow if: ${{ env.REMOVE_PYARROW == '1' }} + shell: bash -el {0} run: | - micromamba remove -y pyarrow - shell: bash -el {0} \ No newline at end of file + micromamba remove -y -n test pyarrow