Skip to content

Commit d7ede50

Browse files
committed
Merge remote-tracking branch 'upstream' into feat/pep770-sbom
2 parents b264ed9 + 3444622 commit d7ede50

118 files changed

Lines changed: 2560 additions & 1530 deletions

File tree

Some content is hidden

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

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
IndentPPDirectives: AfterHash

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ci/ @mroeschke
77
# docs
88
doc/cheatsheet @Dr-Irv
99
doc/source/development @noatamir
10+
doc/source/getting_started @afeld
11+
doc/source/user_guide @afeld
1012

1113
# pandas
1214
pandas/_typing.py @Dr-Irv

.github/workflows/docbuild-and-upload.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,19 @@ on:
1111
branches:
1212
- main
1313
- 2.3.x
14+
workflow_dispatch:
15+
inputs:
16+
version:
17+
description: 'The pandas version to override'
18+
required: false
19+
type: string
1420

1521
env:
1622
ENV_FILE: environment.yml
1723
PANDAS_CI: 1
1824
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
PANDAS_VERSION: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version || '' }}"
26+
PANDAS_VERSION_OVERRIDE: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version || '' }}"
1927

2028
permissions:
2129
contents: read
@@ -35,6 +43,16 @@ jobs:
3543
shell: bash -el {0}
3644

3745
steps:
46+
- name: Set pandas version
47+
run: |
48+
echo "PANDAS_VERSION=${GITHUB_REF_NAME:1}" >> "$GITHUB_ENV"
49+
if: github.event_name != 'workflow_dispatch'
50+
51+
- name: Show environment variables
52+
run: |
53+
echo "PANDAS_VERSION=${{ env.PANDAS_VERSION }}"
54+
echo "PANDAS_VERSION_OVERRIDE=${{ env.PANDAS_VERSION_OVERRIDE }}"
55+
3856
- name: Checkout
3957
uses: actions/checkout@v6
4058
with:
@@ -72,7 +90,7 @@ jobs:
7290
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
7391
chmod 600 ~/.ssh/id_rsa
7492
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFjYkJBk7sos+r7yATODogQc3jUdW1aascGpyOD4bohj8dWjzwLJv/OJ/fyOQ5lmj81WKDk67tGtqNJYGL9acII=" > ~/.ssh/known_hosts
75-
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
93+
if: (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))) || github.event_name == 'workflow_dispatch'
7694

7795
- name: Copy cheatsheets into site directory
7896
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/
@@ -86,8 +104,8 @@ jobs:
86104
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
87105

88106
- name: Upload prod docs
89-
run: rsync -az --delete doc/build/html/ web@${{ secrets.server_ip }}:/var/www/html/pandas-docs/version/${GITHUB_REF_NAME:1}
90-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
107+
run: rsync -az --delete doc/build/html/ web@${{ secrets.server_ip }}:/var/www/html/pandas-docs/version/${{ env.PANDAS_VERSION }}
108+
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || (github.event_name == 'workflow_dispatch' && env.PANDAS_VERSION_OVERRIDE != '')
91109

92110
- name: Move docs into site directory
93111
run: mv doc/build/html web/build/docs

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
- 3306:3306
125125

126126
postgres:
127-
image: postgres:17
127+
image: postgres:18
128128
env:
129129
PGUSER: postgres
130130
POSTGRES_USER: postgres
@@ -139,7 +139,7 @@ jobs:
139139
- 5432:5432
140140

141141
moto:
142-
image: motoserver/moto:5.0.27
142+
image: motoserver/moto:5.1.18
143143
ports:
144144
- 5000:5000
145145

ci/code_checks.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ fi
5757
if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
5858

5959
MSG='Python and Cython Doctests' ; echo "$MSG"
60-
python -c 'import pandas as pd; pd.test(run_doctests=True)'
60+
# Using future.python_scalars=True avoids NumPy scalar reprs in docstrings.
61+
PANDAS_FUTURE_PYTHON_SCALARS="1" python -c 'import pandas as pd; pd.test(run_doctests=True)'
6162
RET=$(($RET + $?)) ; echo "$MSG" "DONE"
6263

6364
fi
@@ -70,14 +71,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7071
--format=actions \
7172
-i ES01 `# For now it is ok if docstrings are missing the extended summary` \
7273
-i "pandas.DataFrame.from_arrow SA01,EX01" \
74+
-i "pandas.Series.from_arrow SA01,EX01" \
7375
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
7476
-i "pandas.Period.freq GL08" \
7577
-i "pandas.Period.ordinal GL08" \
7678
-i "pandas.errors.ChainedAssignmentError SA01" \
7779
-i "pandas.errors.IncompatibleFrequency SA01,SS06,EX01" \
7880
-i "pandas.api.extensions.ExtensionArray.value_counts EX01,RT03,SA01" \
79-
-i "pandas.api.typing.DataFrameGroupBy.plot PR02" \
80-
-i "pandas.api.typing.SeriesGroupBy.plot PR02" \
8181
-i "pandas.api.typing.Resampler.quantile PR01,PR07" \
8282
-i "pandas.StringDtype.storage SA01" \
8383
-i "pandas.StringDtype.na_value SA01" \

doc/source/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@
175175

176176
# version = '%s r%s' % (pandas.__version__, svn_version())
177177
version = str(pandas.__version__)
178+
if version_override := os.environ.get("PANDAS_VERSION_OVERRIDE"):
179+
version = version_override
178180

179181
# The full version, including alpha/beta/rc tags.
180182
release = version
@@ -232,7 +234,7 @@
232234
# further. For a list of options available for each theme, see the
233235
# documentation.
234236

235-
if ".dev" in version:
237+
if ".dev" in version or ("rc" in version and "+" in version):
236238
switcher_version = "dev"
237239
elif "rc" in version:
238240
switcher_version = version.split("rc", maxsplit=1)[0] + " (rc)"
@@ -406,7 +408,7 @@
406408
# html_split_index = False
407409

408410
# If true, links to the reST sources are added to the pages.
409-
# html_show_sourcelink = True
411+
html_show_sourcelink = False
410412

411413
# If true, an OpenSearch description file will be output, and all pages will
412414
# contain a <link> tag referring to it. The value of this option must be the

doc/source/reference/series.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ Serialization / IO / conversion
624624
.. autosummary::
625625
:toctree: api/
626626

627+
Series.from_arrow
627628
Series.to_pickle
628629
Series.to_csv
629630
Series.to_dict

doc/source/user_guide/cookbook.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,16 +1245,16 @@ csv file and creating a store by chunks, with date parsing as well.
12451245
`Reading in a sequence of files, then providing a global unique index to a store while appending
12461246
<https://stackoverflow.com/questions/16997048/how-does-one-append-large-amounts-of-data-to-a-pandas-hdfstore-and-get-a-natural>`__
12471247

1248-
`Groupby on a HDFStore with low group density
1248+
`Groupby on an HDFStore with low group density
12491249
<https://stackoverflow.com/questions/15798209/pandas-group-by-query-on-large-data-in-hdfstore>`__
12501250

1251-
`Groupby on a HDFStore with high group density
1251+
`Groupby on an HDFStore with high group density
12521252
<https://stackoverflow.com/questions/25459982/trouble-with-grouby-on-millions-of-keys-on-a-chunked-file-in-python-pandas/25471765#25471765>`__
12531253

1254-
`Hierarchical queries on a HDFStore
1254+
`Hierarchical queries on an HDFStore
12551255
<https://stackoverflow.com/questions/22777284/improve-query-performance-from-a-large-hdfstore-table-with-pandas/22820780#22820780>`__
12561256

1257-
`Counting with a HDFStore
1257+
`Counting with an HDFStore
12581258
<https://stackoverflow.com/questions/20497897/converting-dict-of-dicts-into-pandas-dataframe-memory-issues>`__
12591259

12601260
`Troubleshoot HDFStore exceptions
@@ -1284,7 +1284,7 @@ Storing Attributes to a group node
12841284
store.close()
12851285
os.remove("test.h5")
12861286
1287-
You can create or load a HDFStore in-memory by passing the ``driver``
1287+
You can create or load an HDFStore in-memory by passing the ``driver``
12881288
parameter to PyTables. Changes are only written to disk when the HDFStore
12891289
is closed.
12901290

doc/source/user_guide/groupby.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ The default setting of ``dropna`` argument is ``True`` which means ``NA`` are no
237237
GroupBy object attributes
238238
~~~~~~~~~~~~~~~~~~~~~~~~~
239239

240-
The ``groups`` attribute is a dictionary whose keys are the computed unique groups
241-
and corresponding values are the index labels belonging to each group. In the
242-
above example we have:
240+
The ``groups`` attribute of a GroupBy object is a dictionary that maps each
241+
unique group key to the index labels belonging to that group. In the above
242+
example:
243243

244244
.. ipython:: python
245245

doc/source/user_guide/text.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ NA values in this array are represented and behave as ``np.nan``.
776776
)
777777
778778
Notice that the last three values are all inferred by pandas as being
779-
an NA values, and hence stored as ``np.nan``.
779+
NA values, and hence stored as ``np.nan``.
780780

781781
PyArrow storage with ``np.nan`` values
782782
--------------------------------------
@@ -795,7 +795,7 @@ are represented and behave as ``np.nan``.
795795
)
796796
797797
Notice that the last three values are all inferred by pandas as being
798-
an NA values, and hence stored as ``np.nan``.
798+
NA values, and hence stored as ``np.nan``.
799799

800800
Python storage with ``pd.NA`` values
801801
------------------------------------

0 commit comments

Comments
 (0)