Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/actions/setup-conda/action.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
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@v2
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
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' }}
run: |
micromamba remove -y pyarrow
shell: bash -el {0}
run: |
micromamba remove -y -n test pyarrow
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 <your-deps-here>
3 changes: 2 additions & 1 deletion .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Empty file added 1.26.0
Empty file.
Empty file added 2.8.2
Empty file.
Empty file added 2023.3
Empty file.
Empty file added conda
Empty file.
32 changes: 31 additions & 1 deletion doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://colab.research.google.com/notebooks/io.ipynb>`_.




engine : {``'c'``, ``'python'``, ``'pyarrow'``}
Parser engine to use. The C and pyarrow engines are faster, while the python engine
Expand Down
Loading