Skip to content

Commit 339a554

Browse files
Merge branch 'pandas-dev:main' into main
2 parents 44f1df0 + c46fb76 commit 339a554

File tree

33 files changed

+169
-117
lines changed

33 files changed

+169
-117
lines changed

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
141141

142142
- name: Build wheels
143-
uses: pypa/cibuildwheel@v2.18.1
143+
uses: pypa/cibuildwheel@v2.19.1
144144
with:
145145
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
146146
env:

ci/code_checks.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
9191
-i "pandas.MultiIndex.to_frame RT03" \
9292
-i "pandas.NA SA01" \
9393
-i "pandas.NaT SA01" \
94-
-i "pandas.NamedAgg SA01" \
9594
-i "pandas.Period.asfreq SA01" \
9695
-i "pandas.Period.freq GL08" \
9796
-i "pandas.Period.freqstr SA01" \
@@ -211,7 +210,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
211210
-i "pandas.Series.to_frame SA01" \
212211
-i "pandas.Series.to_markdown SA01" \
213212
-i "pandas.Series.update PR07,SA01" \
214-
-i "pandas.Timedelta.as_unit SA01" \
215213
-i "pandas.Timedelta.asm8 SA01" \
216214
-i "pandas.Timedelta.ceil SA01" \
217215
-i "pandas.Timedelta.components SA01" \
@@ -464,7 +462,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
464462
-i "pandas.io.stata.StataReader.variable_labels RT03,SA01" \
465463
-i "pandas.io.stata.StataWriter.write_file SA01" \
466464
-i "pandas.json_normalize RT03,SA01" \
467-
-i "pandas.merge_asof PR07,RT03" \
468465
-i "pandas.period_range RT03,SA01" \
469466
-i "pandas.plotting.andrews_curves RT03,SA01" \
470467
-i "pandas.plotting.lag_plot RT03,SA01" \

doc/source/user_guide/basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ For instance:
16061606
This method does not convert the row to a Series object; it merely
16071607
returns the values inside a namedtuple. Therefore,
16081608
:meth:`~DataFrame.itertuples` preserves the data type of the values
1609-
and is generally faster as :meth:`~DataFrame.iterrows`.
1609+
and is generally faster than :meth:`~DataFrame.iterrows`.
16101610

16111611
.. note::
16121612

doc/source/user_guide/io.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,7 +3003,7 @@ However, if XPath does not reference node names such as default, ``/*``, then
30033003
.. note::
30043004

30053005
Since ``xpath`` identifies the parent of content to be parsed, only immediate
3006-
desendants which include child nodes or current attributes are parsed.
3006+
descendants which include child nodes or current attributes are parsed.
30073007
Therefore, ``read_xml`` will not parse the text of grandchildren or other
30083008
descendants and will not parse attributes of any descendant. To retrieve
30093009
lower level content, adjust xpath to lower level. For example,
@@ -3535,7 +3535,7 @@ For example, to read in a ``MultiIndex`` index without names:
35353535
df = pd.read_excel("path_to_file.xlsx", index_col=[0, 1])
35363536
df
35373537
3538-
If the index has level names, they will parsed as well, using the same
3538+
If the index has level names, they will be parsed as well, using the same
35393539
parameters.
35403540

35413541
.. ipython:: python
@@ -5847,10 +5847,10 @@ You can check if a table exists using :func:`~pandas.io.sql.has_table`
58475847
Schema support
58485848
''''''''''''''
58495849

5850-
Reading from and writing to different schema's is supported through the ``schema``
5850+
Reading from and writing to different schemas is supported through the ``schema``
58515851
keyword in the :func:`~pandas.read_sql_table` and :func:`~pandas.DataFrame.to_sql`
58525852
functions. Note however that this depends on the database flavor (sqlite does not
5853-
have schema's). For example:
5853+
have schemas). For example:
58545854

58555855
.. code-block:: python
58565856

doc/source/user_guide/missing_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ Missing values propagate through arithmetic operations between pandas objects.
319319
320320
The descriptive statistics and computational methods discussed in the
321321
:ref:`data structure overview <basics.stats>` (and listed :ref:`here
322-
<api.series.stats>` and :ref:`here <api.dataframe.stats>`) are all
322+
<api.series.stats>` and :ref:`here <api.dataframe.stats>`) all
323323
account for missing data.
324324

325325
When summing data, NA values or empty data will be treated as zero.

doc/source/user_guide/options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Options and settings
88

99
Overview
1010
--------
11-
pandas has an options API configure and customize global behavior related to
11+
pandas has an options API to configure and customize global behavior related to
1212
:class:`DataFrame` display, data behavior and more.
1313

1414
Options have a full "dotted-style", case-insensitive name (e.g. ``display.max_rows``).

doc/source/user_guide/timeseries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ or some other non-observed day. Defined observance rules are:
14791479
"after_nearest_workday", "apply ``nearest_workday`` and then move to next workday after that day"
14801480
"sunday_to_monday", "move Sunday to following Monday"
14811481
"next_monday_or_tuesday", "move Saturday to Monday and Sunday/Monday to Tuesday"
1482-
"previous_friday", move Saturday and Sunday to previous Friday"
1482+
"previous_friday", "move Saturday and Sunday to previous Friday"
14831483
"next_monday", "move Saturday and Sunday to following Monday"
14841484
"weekend_to_monday", "same as ``next_monday``"
14851485

doc/source/whatsnew/v3.0.0.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ Timezones
503503

504504
Numeric
505505
^^^^^^^
506+
- Bug in :meth:`DataFrame.quantile` where the column type was not preserved when ``numeric_only=True`` with a list-like ``q`` produced an empty result (:issue:`59035`)
506507
- Bug in ``np.matmul`` with :class:`Index` inputs raising a ``TypeError`` (:issue:`57079`)
507-
-
508508

509509
Conversion
510510
^^^^^^^^^^
@@ -546,6 +546,7 @@ I/O
546546
- Bug in :meth:`DataFrame.to_excel` when writing empty :class:`DataFrame` with :class:`MultiIndex` on both axes (:issue:`57696`)
547547
- Bug in :meth:`DataFrame.to_stata` when writing :class:`DataFrame` and ``byteorder=`big```. (:issue:`58969`)
548548
- Bug in :meth:`DataFrame.to_string` that raised ``StopIteration`` with nested DataFrames. (:issue:`16098`)
549+
- Bug in :meth:`HDFStore.get` was failing to save data of dtype datetime64[s] correctly (:issue:`59004`)
549550
- Bug in :meth:`read_csv` raising ``TypeError`` when ``index_col`` is specified and ``na_values`` is a dict containing the key ``None``. (:issue:`57547`)
550551
- Bug in :meth:`read_stata` raising ``KeyError`` when input file is stored in big-endian format and contains strL data. (:issue:`58638`)
551552

@@ -608,6 +609,7 @@ Other
608609
- Bug in :meth:`DataFrame.where` where using a non-bool type array in the function would return a ``ValueError`` instead of a ``TypeError`` (:issue:`56330`)
609610
- Bug in :meth:`Index.sort_values` when passing a key function that turns values into tuples, e.g. ``key=natsort.natsort_key``, would raise ``TypeError`` (:issue:`56081`)
610611
- Bug in :meth:`Series.diff` allowing non-integer values for the ``periods`` argument. (:issue:`56607`)
612+
- Bug in :meth:`Series.dt` methods in :class:`ArrowDtype` that were returning incorrect values. (:issue:`57355`)
611613
- Bug in :meth:`Series.rank` that doesn't preserve missing values for nullable integers when ``na_option='keep'``. (:issue:`56976`)
612614
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` inconsistently replacing matching instances when ``regex=True`` and missing values are present. (:issue:`56599`)
613615
- Bug in Dataframe Interchange Protocol implementation was returning incorrect results for data buffers' associated dtype, for string and datetime columns (:issue:`54781`)

pandas/_libs/groupby.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,12 @@ def group_cumsum(
398398
for i in range(N):
399399
lab = labels[i]
400400

401-
if lab < 0:
401+
if uses_mask and lab < 0:
402402
# GH#58811
403-
if uses_mask:
404-
result_mask[i, :] = True
405-
out[i, :] = 0
403+
result_mask[i, :] = True
404+
out[i, :] = 0
405+
continue
406+
elif lab < 0:
406407
continue
407408

408409
for j in range(K):

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,12 @@ cdef class _Timedelta(timedelta):
17311731
-------
17321732
Timedelta
17331733
1734+
See Also
1735+
--------
1736+
Timedelta : Represents a duration, the difference between two dates or times.
1737+
to_timedelta : Convert argument to timedelta.
1738+
Timedelta.asm8 : Return a numpy timedelta64 array scalar view.
1739+
17341740
Examples
17351741
--------
17361742
>>> td = pd.Timedelta('1001ms')

0 commit comments

Comments
 (0)