Skip to content

Commit 5b6b99b

Browse files
committed
reference to pandas-dev#24559
2 parents 3de5abd + 5675cd8 commit 5b6b99b

Some content is hidden

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

71 files changed

+1121
-455
lines changed

.github/workflows/python-dev.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ on:
1010
paths-ignore:
1111
- "doc/**"
1212

13+
env:
14+
PYTEST_WORKERS: "auto"
15+
PANDAS_CI: 1
16+
PATTERN: "not slow and not network and not clipboard"
17+
COVERAGE: true
18+
1319
jobs:
1420
build:
1521
runs-on: ubuntu-latest
@@ -36,7 +42,7 @@ jobs:
3642
pip install git+https://github.com/numpy/numpy.git
3743
pip install git+https://github.com/pytest-dev/pytest.git
3844
pip install git+https://github.com/nedbat/coveragepy.git
39-
pip install cython python-dateutil pytz hypothesis pytest-xdist
45+
pip install cython python-dateutil pytz hypothesis pytest-xdist pytest-cov
4046
pip list
4147
4248
- name: Build Pandas
@@ -50,7 +56,8 @@ jobs:
5056
5157
- name: Test with pytest
5258
run: |
53-
coverage run -m pytest -m 'not slow and not network and not clipboard' pandas
59+
ci/run_tests.sh
60+
# GH 41935
5461
continue-on-error: true
5562

5663
- name: Publish test results

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ repos:
5353
types: [text]
5454
args: [--append-config=flake8/cython-template.cfg]
5555
- repo: https://github.com/PyCQA/isort
56-
rev: 5.9.0
56+
rev: 5.9.1
5757
hooks:
5858
- id: isort
5959
- repo: https://github.com/asottile/pyupgrade

asv_bench/benchmarks/algos/isin.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import numpy as np
22

3-
from pandas.compat.numpy import np_version_under1p20
3+
try:
4+
from pandas.compat import np_version_under1p20
5+
except ImportError:
6+
from pandas.compat.numpy import _np_version_under1p20 as np_version_under1p20
47

58
from pandas import (
69
Categorical,

asv_bench/benchmarks/groupby.py

+14
Original file line numberDiff line numberDiff line change
@@ -832,4 +832,18 @@ def function(values):
832832
self.grouper.agg(function, engine="cython")
833833

834834

835+
class Sample:
836+
def setup(self):
837+
N = 10 ** 3
838+
self.df = DataFrame({"a": np.zeros(N)})
839+
self.groups = np.arange(0, N)
840+
self.weights = np.ones(N)
841+
842+
def time_sample(self):
843+
self.df.groupby(self.groups).sample(n=1)
844+
845+
def time_sample_weights(self):
846+
self.df.groupby(self.groups).sample(n=1, weights=self.weights)
847+
848+
835849
from .pandas_vb_common import setup # noqa: F401 isort:skip

ci/azure/windows.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ jobs:
1212
ENV_FILE: ci/deps/azure-windows-37.yaml
1313
CONDA_PY: "37"
1414
PATTERN: "not slow and not network"
15+
PYTEST_WORKERS: 2 # GH-42236
1516

1617
py38_np18:
1718
ENV_FILE: ci/deps/azure-windows-38.yaml
1819
CONDA_PY: "38"
1920
PATTERN: "not slow and not network and not high_memory"
21+
PYTEST_WORKERS: 2 # GH-42236
2022

2123
steps:
2224
- powershell: |

doc/source/whatsnew/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 1.3
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v1.3.1
2728
v1.3.0
2829

2930
Version 1.2

doc/source/whatsnew/v1.3.0.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_130:
22

3-
What's new in 1.3.0 (June ??)
4-
-----------------------------
3+
What's new in 1.3.0 (July 2, 2021)
4+
----------------------------------
55

66
These are the changes in pandas 1.3.0. See :ref:`release` for a full changelog
77
including other versions of pandas.
@@ -136,7 +136,7 @@ which has been revised and improved (:issue:`39720`, :issue:`39317`, :issue:`404
136136
- Many features of the :class:`.Styler` class are now either partially or fully usable on a DataFrame with a non-unique indexes or columns (:issue:`41143`)
137137
- One has greater control of the display through separate sparsification of the index or columns using the :ref:`new styler options <options.available>`, which are also usable via :func:`option_context` (:issue:`41142`)
138138
- Added the option ``styler.render.max_elements`` to avoid browser overload when styling large DataFrames (:issue:`40712`)
139-
- Added the method :meth:`.Styler.to_latex` (:issue:`21673`), which also allows some limited CSS conversion (:issue:`40731`)
139+
- Added the method :meth:`.Styler.to_latex` (:issue:`21673`, :issue:`42320`), which also allows some limited CSS conversion (:issue:`40731`)
140140
- Added the method :meth:`.Styler.to_html` (:issue:`13379`)
141141
- Added the method :meth:`.Styler.set_sticky` to make index and column headers permanently visible in scrolling HTML frames (:issue:`29072`)
142142

@@ -707,6 +707,7 @@ Other API changes
707707
- Added new ``engine`` and ``**engine_kwargs`` parameters to :meth:`DataFrame.to_sql` to support other future "SQL engines". Currently we still only use ``SQLAlchemy`` under the hood, but more engines are planned to be supported such as `turbodbc <https://turbodbc.readthedocs.io/en/latest/>`_ (:issue:`36893`)
708708
- Removed redundant ``freq`` from :class:`PeriodIndex` string representation (:issue:`41653`)
709709
- :meth:`ExtensionDtype.construct_array_type` is now a required method instead of an optional one for :class:`ExtensionDtype` subclasses (:issue:`24860`)
710+
- Calling ``hash`` on non-hashable pandas objects will now raise ``TypeError`` with the built-in error message (e.g. ``unhashable type: 'Series'``). Previously it would raise a custom message such as ``'Series' objects are mutable, thus they cannot be hashed``. Furthermore, ``isinstance(<Series>, abc.collections.Hashable)`` will now return ``False`` (:issue:`40013`)
710711
- :meth:`.Styler.from_custom_template` now has two new arguments for template names, and removed the old ``name``, due to template inheritance having been introducing for better parsing (:issue:`42053`). Subclassing modifications to Styler attributes are also needed.
711712

712713
.. _whatsnew_130.api_breaking.build:
@@ -1232,4 +1233,4 @@ Other
12321233
Contributors
12331234
~~~~~~~~~~~~
12341235

1235-
.. contributors:: v1.2.5..v1.3.0|HEAD
1236+
.. contributors:: v1.2.5..v1.3.0

doc/source/whatsnew/v1.3.1.rst

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. _whatsnew_131:
2+
3+
What's new in 1.3.1 (July ??, 2021)
4+
-----------------------------------
5+
6+
These are the changes in pandas 1.3.1. See :ref:`release` for a full changelog
7+
including other versions of pandas.
8+
9+
{{ header }}
10+
11+
.. ---------------------------------------------------------------------------
12+
13+
.. _whatsnew_131.regressions:
14+
15+
Fixed regressions
16+
~~~~~~~~~~~~~~~~~
17+
-
18+
-
19+
20+
.. ---------------------------------------------------------------------------
21+
22+
.. _whatsnew_131.bug_fixes:
23+
24+
Bug fixes
25+
~~~~~~~~~
26+
-
27+
-
28+
29+
.. ---------------------------------------------------------------------------
30+
31+
.. _whatsnew_131.other:
32+
33+
Other
34+
~~~~~
35+
-
36+
-
37+
38+
.. ---------------------------------------------------------------------------
39+
40+
.. _whatsnew_131.contributors:
41+
42+
Contributors
43+
~~~~~~~~~~~~
44+
45+
.. contributors:: v1.3.0..v1.3.1|HEAD

doc/source/whatsnew/v1.4.0.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for mor
8787

8888
Other API changes
8989
^^^^^^^^^^^^^^^^^
90-
-
90+
- :meth:`Index.get_indexer_for` no longer accepts keyword arguments (other than 'target'); in the past these would be silently ignored if the index was not unique (:issue:`42310`)
9191
-
9292

9393
.. ---------------------------------------------------------------------------
@@ -97,7 +97,8 @@ Other API changes
9797
Deprecations
9898
~~~~~~~~~~~~
9999
- Deprecated :meth:`Index.is_type_compatible` (:issue:`42113`)
100-
- Deprecated treating ``numpy.datetime64`` objects as UTC times when passed to the :class:`Timestamp` constructor along with a timezone. In a future version, these will be treated as wall-times. To retain the old behavior, use ``Timestamp(dt64).tz_localize("UTC").tz_convert(tz)`` (:issue:`42288`)
100+
- Deprecated ``method`` argument in :meth:`Index.get_loc`, use ``index.get_indexer([label], method=...)`` instead (:issue:`42269`)
101+
- Deprecated treating ``numpy.datetime64`` objects as UTC times when passed to the :class:`Timestamp` constructor along with a timezone. In a future version, these will be treated as wall-times. To retain the old behavior, use ``Timestamp(dt64).tz_localize("UTC").tz_convert(tz)`` (:issue:`24559`)
101102
-
102103

103104
.. ---------------------------------------------------------------------------
@@ -106,7 +107,7 @@ Deprecations
106107

107108
Performance improvements
108109
~~~~~~~~~~~~~~~~~~~~~~~~
109-
-
110+
- Performance improvement in :meth:`.GroupBy.sample`, especially when ``weights`` argument provided (:issue:`34483`)
110111
-
111112

112113
.. ---------------------------------------------------------------------------
@@ -159,7 +160,7 @@ Interval
159160

160161
Indexing
161162
^^^^^^^^
162-
-
163+
- Bug in indexing on a :class:`Series` or :class:`DataFrame` with a :class:`DatetimeIndex` when passing a string, the return type depended on whether the index was monotonic (:issue:`24892`)
163164
-
164165

165166
Missing
@@ -174,6 +175,7 @@ MultiIndex
174175

175176
I/O
176177
^^^
178+
- Bug in :func:`read_excel` attempting to read chart sheets from .xlsx files (:issue:`41448`)
177179
-
178180
-
179181

pandas/_libs/algos.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def is_monotonic(
123123

124124
def rank_1d(
125125
values: np.ndarray, # ndarray[rank_t, ndim=1]
126-
labels: np.ndarray, # const int64_t[:]
126+
labels: np.ndarray | None = ..., # const int64_t[:]=None
127127
is_datetimelike: bool = ...,
128128
ties_method=...,
129129
ascending: bool = ...,

0 commit comments

Comments
 (0)