Skip to content

Commit 5f6ab41

Browse files
committed
Merge branch 'main' of github.com:pandas-dev/pandas into issue-37210-to-sql-truncate
2 parents 341843c + 5e50d3f commit 5f6ab41

34 files changed

+280
-159
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ BSD 3-Clause License
33
Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
44
All rights reserved.
55

6-
Copyright (c) 2011-2024, Open source contributors.
6+
Copyright (c) 2011-2025, Open source contributors.
77

88
Redistribution and use in source and binary forms, with or without
99
modification, are permitted provided that the following conditions are met:

ci/code_checks.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8181
-i "pandas.Timestamp.resolution PR02" \
8282
-i "pandas.Timestamp.tzinfo GL08" \
8383
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
84-
-i "pandas.arrays.NumpyExtensionArray SA01" \
8584
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
8685
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
8786
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
88-
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
89-
-i "pandas.core.resample.Resampler.mean SA01" \
90-
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
91-
-i "pandas.core.resample.Resampler.prod SA01" \
9287
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
93-
-i "pandas.core.resample.Resampler.std SA01" \
9488
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
95-
-i "pandas.core.resample.Resampler.var SA01" \
9689
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
9790
-i "pandas.plotting.andrews_curves RT03,SA01" \
9891
-i "pandas.tseries.offsets.BDay PR02,SA01" \
507 KB
Binary file not shown.
119 KB
Binary file not shown.

doc/cheatsheet/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ and pick "PDF" as the format.
66

77
This cheat sheet, originally written by Irv Lustig, [Princeton Consultants](https://www.princetonoptimization.com/), was inspired by the [RStudio Data Wrangling Cheatsheet](https://www.rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf).
88

9-
| Topic | PDF | PPT |
10-
|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
11-
| Pandas_Cheat_Sheet | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
12-
| Pandas_Cheat_Sheet_JA | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
9+
| Topic | Language | PDF | PPT |
10+
|------------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
11+
| Pandas_Cheat_Sheet | English | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
12+
| Pandas_Cheat_Sheet_JA | Japanese | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_JA.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
13+
| Pandas_Cheat_Sheet_FA | Persian | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_FA.pdf" target="_parent"><img src="https://img.shields.io/badge/Open in PDF-%23FF0000.svg?style=flat-square&logo=adobe&logoColor=white"/></a> | <a href="https://github.com/pandas-dev/pandas/blob/main/doc/cheatsheet/Pandas_Cheat_Sheet_FA.pptx" target="_parent"><img src="https://img.shields.io/badge/Open in PPT-B7472A?style=flat-square&logo=microsoft-powerpoint&logoColor=white"/></a> |
14+
1315

1416

1517
**Alternative**

doc/source/user_guide/indexing.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,10 @@ and :ref:`Advanced Indexing <advanced>` you may select along more than one axis
858858
859859
.. warning::
860860

861-
``iloc`` supports two kinds of boolean indexing. If the indexer is a boolean ``Series``,
862-
an error will be raised. For instance, in the following example, ``df.iloc[s.values, 1]`` is ok.
863-
The boolean indexer is an array. But ``df.iloc[s, 1]`` would raise ``ValueError``.
861+
While ``loc`` supports two kinds of boolean indexing, ``iloc`` only supports indexing with a
862+
boolean array. If the indexer is a boolean ``Series``, an error will be raised. For instance,
863+
in the following example, ``df.iloc[s.values, 1]`` is ok. The boolean indexer is an array.
864+
But ``df.iloc[s, 1]`` would raise ``ValueError``.
864865

865866
.. ipython:: python
866867

doc/source/user_guide/visualization.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,11 +1210,6 @@ You may set the ``xlabel`` and ``ylabel`` arguments to give the plot custom labe
12101210
for x and y axis. By default, pandas will pick up index name as xlabel, while leaving
12111211
it empty for ylabel.
12121212

1213-
.. ipython:: python
1214-
:suppress:
1215-
1216-
plt.figure();
1217-
12181213
.. ipython:: python
12191214
12201215
df.plot();

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Other enhancements
6161
- :meth:`pandas.concat` will raise a ``ValueError`` when ``ignore_index=True`` and ``keys`` is not ``None`` (:issue:`59274`)
6262
- :meth:`str.get_dummies` now accepts a ``dtype`` parameter to specify the dtype of the resulting DataFrame (:issue:`47872`)
6363
- Add ``"delete_rows"`` option to ``if_exists`` argument in :meth:`DataFrame.to_sql` deleting all records of the table before inserting data (:issue:`37210`).
64+
- Implemented :meth:`Series.str.isascii` and :meth:`Series.str.isascii` (:issue:`59091`)
6465
- Multiplying two :class:`DateOffset` objects will now raise a ``TypeError`` instead of a ``RecursionError`` (:issue:`59442`)
6566
- Restore support for reading Stata 104-format and enable reading 103-format dta files (:issue:`58554`)
6667
- Support passing a :class:`Iterable[Hashable]` input to :meth:`DataFrame.drop_duplicates` (:issue:`59237`)

pandas/_libs/index.pyx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -561,23 +561,15 @@ cdef class StringObjectEngine(ObjectEngine):
561561

562562
cdef:
563563
object na_value
564-
bint uses_na
565564

566565
def __init__(self, ndarray values, na_value):
567566
super().__init__(values)
568567
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)
576568

577569
cdef _check_type(self, object val):
578570
if isinstance(val, str):
579571
return val
580-
elif self._checknull(val):
572+
elif checknull(val):
581573
return self.na_value
582574
else:
583575
raise KeyError(val)

pandas/_libs/tslibs/nattype.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ class NaTType(_NaT):
704704
difference between the current timezone and UTC.
705705
706706
Returns
707-
--------
707+
-------
708708
timedelta
709709
The difference between UTC and the local time as a `timedelta` object.
710710

0 commit comments

Comments
 (0)