Skip to content

Commit 3be92df

Browse files
authored
Merge branch 'main' into issue-37210-to-sql-truncate
2 parents fa98d49 + 1d809c3 commit 3be92df

File tree

28 files changed

+309
-38
lines changed

28 files changed

+309
-38
lines changed

.github/workflows/comment-commands.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
issue_assign:
1313
runs-on: ubuntu-22.04
14-
if: (!github.event.issue.pull_request) && trim(github.event.comment.body) == 'take'
14+
if: (!github.event.issue.pull_request) && github.event.comment.body == 'take'
1515
concurrency:
1616
group: ${{ github.actor }}-issue-assign
1717
steps:

.github/workflows/wheels.yml

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

154154
- name: Build wheels
155-
uses: pypa/cibuildwheel@v2.21.3
155+
uses: pypa/cibuildwheel@v2.22.0
156156
with:
157157
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
158158
env:

ci/code_checks.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8282
-i "pandas.Timestamp.min PR02" \
8383
-i "pandas.Timestamp.resolution PR02" \
8484
-i "pandas.Timestamp.tzinfo GL08" \
85-
-i "pandas.api.types.is_re_compilable PR07,SA01" \
8685
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
8786
-i "pandas.arrays.IntegerArray SA01" \
8887
-i "pandas.arrays.IntervalArray.length SA01" \
@@ -109,17 +108,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
109108
-i "pandas.core.resample.Resampler.std SA01" \
110109
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
111110
-i "pandas.core.resample.Resampler.var SA01" \
112-
-i "pandas.errors.DuplicateLabelError SA01" \
113111
-i "pandas.errors.IntCastingNaNError SA01" \
114-
-i "pandas.errors.InvalidIndexError SA01" \
115112
-i "pandas.errors.NullFrequencyError SA01" \
116-
-i "pandas.errors.NumExprClobberingError SA01" \
117113
-i "pandas.errors.NumbaUtilError SA01" \
118-
-i "pandas.errors.OutOfBoundsTimedelta SA01" \
119114
-i "pandas.errors.PerformanceWarning SA01" \
120-
-i "pandas.errors.PossibleDataLossError SA01" \
121115
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
122-
-i "pandas.errors.UnsortedIndexError SA01" \
123116
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
124117
-i "pandas.infer_freq SA01" \
125118
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \

doc/source/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@
242242
"external_links": [],
243243
"footer_start": ["pandas_footer", "sphinx-version"],
244244
"github_url": "https://github.com/pandas-dev/pandas",
245-
"twitter_url": "https://twitter.com/pandas_dev",
246245
"analytics": {
247246
"plausible_analytics_domain": "pandas.pydata.org",
248247
"plausible_analytics_url": "https://views.scientific-python.org/js/script.js",
@@ -258,6 +257,11 @@
258257
# patch version doesn't compare as equal (e.g. 2.2.1 != 2.2.0 but it should be)
259258
"show_version_warning_banner": False,
260259
"icon_links": [
260+
{
261+
"name": "X",
262+
"url": "https://x.com/pandas_dev",
263+
"icon": "fa-brands fa-square-x-twitter",
264+
},
261265
{
262266
"name": "Mastodon",
263267
"url": "https://fosstodon.org/@pandas_dev",

doc/source/user_guide/reshaping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ The missing value can be filled with a specific value with the ``fill_value`` ar
321321
.. image:: ../_static/reshaping_melt.png
322322

323323
The top-level :func:`~pandas.melt` function and the corresponding :meth:`DataFrame.melt`
324-
are useful to massage a :class:`DataFrame` into a format where one or more columns
324+
are useful to reshape a :class:`DataFrame` into a format where one or more columns
325325
are *identifier variables*, while all other columns, considered *measured
326326
variables*, are "unpivoted" to the row axis, leaving just two non-identifier
327327
columns, "variable" and "value". The names of those columns can be customized

doc/source/user_guide/window.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,9 @@ One must have :math:`0 < \alpha \leq 1`, and while it is possible to pass
567567
568568
\alpha =
569569
\begin{cases}
570-
\frac{2}{s + 1}, & \text{for span}\ s \geq 1\\
571-
\frac{1}{1 + c}, & \text{for center of mass}\ c \geq 0\\
572-
1 - \exp^{\frac{\log 0.5}{h}}, & \text{for half-life}\ h > 0
570+
\frac{2}{s + 1}, & \text{for span}\ s \geq 1\\
571+
\frac{1}{1 + c}, & \text{for center of mass}\ c \geq 0\\
572+
1 - e^{\frac{\log 0.5}{h}}, & \text{for half-life}\ h > 0
573573
\end{cases}
574574
575575
One must specify precisely one of **span**, **center of mass**, **half-life**

doc/source/whatsnew/v3.0.0.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ I/O
691691
- Bug in :meth:`DataFrame.from_records` where ``columns`` parameter with numpy structured array was not reordering and filtering out the columns (:issue:`59717`)
692692
- Bug in :meth:`DataFrame.to_dict` raises unnecessary ``UserWarning`` when columns are not unique and ``orient='tight'``. (:issue:`58281`)
693693
- Bug in :meth:`DataFrame.to_excel` when writing empty :class:`DataFrame` with :class:`MultiIndex` on both axes (:issue:`57696`)
694+
- Bug in :meth:`DataFrame.to_excel` where the :class:`MultiIndex` index with a period level was not a date (:issue:`60099`)
694695
- Bug in :meth:`DataFrame.to_stata` when writing :class:`DataFrame` and ``byteorder=`big```. (:issue:`58969`)
695696
- Bug in :meth:`DataFrame.to_stata` when writing more than 32,000 value labels. (:issue:`60107`)
696697
- Bug in :meth:`DataFrame.to_string` that raised ``StopIteration`` with nested DataFrames. (:issue:`16098`)
@@ -761,6 +762,7 @@ ExtensionArray
761762
- Bug in :meth:`.arrays.ArrowExtensionArray.__setitem__` which caused wrong behavior when using an integer array with repeated values as a key (:issue:`58530`)
762763
- Bug in :meth:`api.types.is_datetime64_any_dtype` where a custom :class:`ExtensionDtype` would return ``False`` for array-likes (:issue:`57055`)
763764
- Bug in comparison between object with :class:`ArrowDtype` and incompatible-dtyped (e.g. string vs bool) incorrectly raising instead of returning all-``False`` (for ``==``) or all-``True`` (for ``!=``) (:issue:`59505`)
765+
- Bug in constructing pandas data structures when passing into ``dtype`` a string of the type followed by ``[pyarrow]`` while PyArrow is not installed would raise ``NameError`` rather than ``ImportError`` (:issue:`57928`)
764766
- Bug in various :class:`DataFrame` reductions for pyarrow temporal dtypes returning incorrect dtype when result was null (:issue:`59234`)
765767

766768
Styler
@@ -789,6 +791,7 @@ Other
789791
- Bug in :meth:`Series.dt` methods in :class:`ArrowDtype` that were returning incorrect values. (:issue:`57355`)
790792
- Bug in :meth:`Series.rank` that doesn't preserve missing values for nullable integers when ``na_option='keep'``. (:issue:`56976`)
791793
- Bug in :meth:`Series.replace` and :meth:`DataFrame.replace` inconsistently replacing matching instances when ``regex=True`` and missing values are present. (:issue:`56599`)
794+
- Bug in :meth:`Series.to_string` when series contains complex floats with exponents (:issue:`60405`)
792795
- Bug in :meth:`read_csv` where chained fsspec TAR file and ``compression="infer"`` fails with ``tarfile.ReadError`` (:issue:`60028`)
793796
- Bug in Dataframe Interchange Protocol implementation was returning incorrect results for data buffers' associated dtype, for string and datetime columns (:issue:`54781`)
794797
- Bug in ``Series.list`` methods not preserving the original :class:`Index`. (:issue:`58425`)

pandas/_libs/index.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ class MaskedUInt16Engine(MaskedIndexEngine): ...
7272
class MaskedUInt8Engine(MaskedIndexEngine): ...
7373
class MaskedBoolEngine(MaskedUInt8Engine): ...
7474

75+
class StringObjectEngine(ObjectEngine):
76+
def __init__(self, values: object, na_value) -> None: ...
77+
7578
class BaseMultiIndexCodesEngine:
7679
levels: list[np.ndarray]
7780
offsets: np.ndarray # np.ndarray[..., ndim=1]

pandas/_libs/index.pyx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,31 @@ cdef class StringEngine(IndexEngine):
557557
raise KeyError(val)
558558
return str(val)
559559

560+
cdef class StringObjectEngine(ObjectEngine):
561+
562+
cdef:
563+
object na_value
564+
bint uses_na
565+
566+
def __init__(self, ndarray values, na_value):
567+
super().__init__(values)
568+
self.na_value = na_value
569+
self.uses_na = na_value is C_NA
570+
571+
cdef bint _checknull(self, object val):
572+
if self.uses_na:
573+
return val is C_NA
574+
else:
575+
return util.is_nan(val)
576+
577+
cdef _check_type(self, object val):
578+
if isinstance(val, str):
579+
return val
580+
elif self._checknull(val):
581+
return self.na_value
582+
else:
583+
raise KeyError(val)
584+
560585

561586
cdef class DatetimeEngine(Int64Engine):
562587

pandas/_libs/tslibs/np_datetime.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ class OutOfBoundsTimedelta(ValueError):
201201
202202
Representation should be within a timedelta64[ns].
203203
204+
See Also
205+
--------
206+
date_range : Return a fixed frequency DatetimeIndex.
207+
204208
Examples
205209
--------
206210
>>> pd.date_range(start="1/1/1700", freq="B", periods=100000)

0 commit comments

Comments
 (0)