Skip to content

Commit cdb7146

Browse files
committed
Merge branch 'main' of https://github.com/pandas-dev/pandas into bump_cython_31
2 parents 121115e + 3555dbc commit cdb7146

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+735
-227
lines changed

.github/workflows/wheels.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ jobs:
9999
# Note: M1 images on Github Actions start from macOS 14
100100
- [macos-14, macosx_arm64]
101101
- [windows-2022, win_amd64]
102+
- [windows-11-arm, win_arm64]
102103
# TODO: support PyPy?
103104
python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]]
104105
include:
@@ -108,6 +109,12 @@ jobs:
108109
- buildplat: [ubuntu-24.04, pyodide_wasm32]
109110
python: ["cp312", "3.12"]
110111
cibw_build_frontend: 'build'
112+
exclude:
113+
- buildplat: [windows-11-arm, win_arm64]
114+
python: ["cp310", "3.10"]
115+
# BackendUnavailable: Cannot import 'mesonpy'
116+
- buildplat: [windows-11-arm, win_arm64]
117+
python: ["cp313t", "3.13"]
111118

112119
env:
113120
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
@@ -118,6 +125,12 @@ jobs:
118125
with:
119126
fetch-depth: 0
120127

128+
- name: Set up MSVC environment for ARM64
129+
if: matrix.buildplat[1] == 'win_arm64'
130+
uses: ilammy/msvc-dev-cmd@v1
131+
with:
132+
arch: arm64
133+
121134
# TODO: Build wheels from sdist again
122135
# There's some sort of weird race condition?
123136
# within Github that makes the sdist be missing files
@@ -155,9 +168,13 @@ jobs:
155168
env:
156169
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
157170
CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend || 'pip' }}
158-
CIBW_PLATFORM: ${{ matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide' || 'auto' }}
171+
CIBW_PLATFORM: ${{ (matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide') || (matrix.buildplat[1] == 'win_arm64' && 'windows') || 'auto' }}
172+
CIBW_ARCHS: ${{ matrix.buildplat[1] == 'win_arm64' && 'ARM64' || 'auto' }}
173+
CIBW_BEFORE_BUILD_WINDOWS: 'python -m pip install delvewheel'
159174

160-
- name: Set up Python
175+
- name: Set up Python for validation/upload (non-ARM64 Windows & other OS)
176+
# micromamba is not available for ARM64 Windows
177+
if: matrix.buildplat[1] != 'win_arm64'
161178
uses: mamba-org/setup-micromamba@v2
162179
with:
163180
environment-name: wheel-env
@@ -170,6 +187,12 @@ jobs:
170187
cache-downloads: true
171188
cache-environment: true
172189

190+
- name: Install wheel for win_arm64
191+
# installing wheel here because micromamba step was skipped
192+
if: matrix.buildplat[1] == 'win_arm64'
193+
shell: bash -el {0}
194+
run: python -m pip install wheel
195+
173196
- name: Validate wheel RECORD
174197
shell: bash -el {0}
175198
run: for whl in $(ls wheelhouse); do wheel unpack wheelhouse/$whl -d /tmp; done

doc/source/development/contributing_environment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ This option allows you to configure where meson stores your built C extensions,
251251
Sometimes, it might be useful to compile pandas with debugging symbols, when debugging C extensions.
252252
Appending ``-Csetup-args="-Ddebug=true"`` will do the trick.
253253

254-
With pip, it is possible to chain together multiple config settings (for example specifying both a build directory
254+
With pip, it is possible to chain together multiple config settings. For example, specifying both a build directory
255255
and building with debug symbols would look like
256256
``-Cbuilddir="your builddir here" -Csetup-args="-Dbuildtype=debug"``.
257257

doc/source/user_guide/10min.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,26 @@ Getitem (``[]``)
178178
~~~~~~~~~~~~~~~~
179179

180180
For a :class:`DataFrame`, passing a single label selects a column and
181-
yields a :class:`Series` equivalent to ``df.A``:
181+
yields a :class:`Series`:
182182

183183
.. ipython:: python
184184
185185
df["A"]
186186
187+
If the label only contains letters, numbers, and underscores, you can
188+
alternatively use the column name attribute:
189+
190+
.. ipython:: python
191+
192+
df.A
193+
194+
Passing a list of column labels selects multiple columns, which can be useful
195+
for getting a subset/rearranging:
196+
197+
.. ipython:: python
198+
199+
df[["B", "A"]]
200+
187201
For a :class:`DataFrame`, passing a slice ``:`` selects matching rows:
188202

189203
.. ipython:: python

doc/source/user_guide/indexing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ The ``.loc`` attribute is the primary access method. The following are valid inp
325325

326326
* A single label, e.g. ``5`` or ``'a'`` (Note that ``5`` is interpreted as a *label* of the index. This use is **not** an integer position along the index.).
327327
* A list or array of labels ``['a', 'b', 'c']``.
328-
* A slice object with labels ``'a':'f'`` (Note that contrary to usual Python
328+
* A slice object with labels ``'a':'f'``. Note that contrary to usual Python
329329
slices, **both** the start and the stop are included, when present in the
330330
index! See :ref:`Slicing with labels <indexing.slicing_with_labels>`.
331331
* A boolean array.

doc/source/user_guide/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,7 @@ of multi-columns indices.
14151415
14161416
.. note::
14171417
If an ``index_col`` is not specified (e.g. you don't have an index, or wrote it
1418-
with ``df.to_csv(..., index=False)``, then any ``names`` on the columns index will
1418+
with ``df.to_csv(..., index=False)``), then any ``names`` on the columns index will
14191419
be *lost*.
14201420

14211421
.. ipython:: python

doc/source/user_guide/sparse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ and in the Python interpreter.
4040

4141
.. ipython:: python
4242
43-
'dense : {:0.2f} bytes'.format(df.memory_usage().sum() / 1e3)
44-
'sparse: {:0.2f} bytes'.format(sdf.memory_usage().sum() / 1e3)
43+
f'dense: {df.memory_usage().sum()} bytes'
44+
f'sparse: {sdf.memory_usage().sum()} bytes'
4545
4646
Functionally, their behavior should be nearly
4747
identical to their dense counterparts.

doc/source/user_guide/timeseries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2458,7 +2458,7 @@ you can use the ``tz_convert`` method.
24582458

24592459
For ``pytz`` time zones, it is incorrect to pass a time zone object directly into
24602460
the ``datetime.datetime`` constructor
2461-
(e.g., ``datetime.datetime(2011, 1, 1, tzinfo=pytz.timezone('US/Eastern'))``.
2461+
(e.g., ``datetime.datetime(2011, 1, 1, tzinfo=pytz.timezone('US/Eastern'))``).
24622462
Instead, the datetime needs to be localized using the ``localize`` method
24632463
on the ``pytz`` time zone object.
24642464

0 commit comments

Comments
 (0)