Skip to content

Commit 1262632

Browse files
committed
Merge remote-tracking branch 'upstream/master' into Rt05
* upstream/master: (21 commits) TST: use a fixed seed to have the same uniques across python versions (pandas-dev#25346) BUG: Fix passing of numeric_only argument for categorical reduce (pandas-dev#25304) ENH: Support times with timezones in at_time (pandas-dev#25280) COMPAT: alias .to_numpy() for timestamp and timedelta scalars (pandas-dev#25142) DOC/CLN: Fix various docstring errors (pandas-dev#25295) Bug: OverflowError in resample.agg with tz data (pandas-dev#25297) Fixes Formatting Exception (pandas-dev#25088) BUG: groupby.transform retains timezone information (pandas-dev#25264) Doc: corrects spelling in generic.py (pandas-dev#25333) Fix typos in docs (pandas-dev#25305) Rt05 documentation error fix issue 25108 (pandas-dev#25309) Skipped broken Py2 / Windows test (pandas-dev#25323) DOC/CLN: Fix errors in DataFrame docstrings (pandas-dev#24952) DOC: Fix minor typo in docstring (pandas-dev#25285) Removed Panel class from HDF ASVs (pandas-dev#25281) TST/CLN: remove test_slice_ints_with_floats_raises (pandas-dev#25277) Edit parameter type in pandas.core.frame.py DataFrame.count (pandas-dev#25198) Fix typo in Cheat sheet with regex (pandas-dev#25215) Refactor groupby group_prod, group_var, group_mean, group_ohlc (pandas-dev#25249) REF: use _constructor and ABCFoo to avoid runtime imports (pandas-dev#25272) ...
2 parents 1824b99 + 4a20d5b commit 1262632

Some content is hidden

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

62 files changed

+851
-591
lines changed

asv_bench/benchmarks/io/hdf.py

+1-28
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import warnings
2-
31
import numpy as np
4-
from pandas import DataFrame, Panel, date_range, HDFStore, read_hdf
2+
from pandas import DataFrame, date_range, HDFStore, read_hdf
53
import pandas.util.testing as tm
64

75
from ..pandas_vb_common import BaseIO
@@ -99,31 +97,6 @@ def time_store_info(self):
9997
self.store.info()
10098

10199

102-
class HDFStorePanel(BaseIO):
103-
104-
def setup(self):
105-
self.fname = '__test__.h5'
106-
with warnings.catch_warnings(record=True):
107-
self.p = Panel(np.random.randn(20, 1000, 25),
108-
items=['Item%03d' % i for i in range(20)],
109-
major_axis=date_range('1/1/2000', periods=1000),
110-
minor_axis=['E%03d' % i for i in range(25)])
111-
self.store = HDFStore(self.fname)
112-
self.store.append('p1', self.p)
113-
114-
def teardown(self):
115-
self.store.close()
116-
self.remove(self.fname)
117-
118-
def time_read_store_table_panel(self):
119-
with warnings.catch_warnings(record=True):
120-
self.store.select('p1')
121-
122-
def time_write_store_table_panel(self):
123-
with warnings.catch_warnings(record=True):
124-
self.store.append('p2', self.p)
125-
126-
127100
class HDF(BaseIO):
128101

129102
params = ['table', 'fixed']

ci/deps/azure-27-compat.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies:
2020
# universal
2121
- pytest
2222
- pytest-xdist
23+
- pytest-mock
2324
- pip:
2425
- html5lib==1.0b2
2526
- beautifulsoup4==4.2.1

ci/deps/azure-27-locale.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies:
2222
# universal
2323
- pytest
2424
- pytest-xdist
25+
- pytest-mock
2526
- hypothesis>=3.58.0
2627
- pip:
2728
- html5lib==1.0b2

ci/deps/azure-36-locale_slow.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
# universal
2929
- pytest
3030
- pytest-xdist
31+
- pytest-mock
3132
- moto
3233
- pip:
3334
- hypothesis>=3.58.0

ci/deps/azure-37-locale.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ dependencies:
2727
# universal
2828
- pytest
2929
- pytest-xdist
30+
- pytest-mock
3031
- pip:
3132
- hypothesis>=3.58.0
3233
- moto # latest moto in conda-forge fails with 3.7, move to conda dependencies when this is fixed

ci/deps/azure-37-numpydev.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies:
88
# universal
99
- pytest
1010
- pytest-xdist
11+
- pytest-mock
1112
- hypothesis>=3.58.0
1213
- pip:
1314
- "git+git://github.com/dateutil/dateutil.git"

ci/deps/azure-macos-35.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies:
2424
# universal
2525
- pytest
2626
- pytest-xdist
27+
- pytest-mock
2728
- pip:
2829
- python-dateutil==2.5.3
2930
- hypothesis>=3.58.0

ci/deps/azure-windows-27.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ dependencies:
2727
- cython>=0.28.2
2828
- pytest
2929
- pytest-xdist
30+
- pytest-mock
3031
- moto
3132
- hypothesis>=3.58.0

ci/deps/azure-windows-36.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ dependencies:
2525
- cython>=0.28.2
2626
- pytest
2727
- pytest-xdist
28+
- pytest-mock
2829
- hypothesis>=3.58.0

ci/deps/travis-27.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ dependencies:
4141
# universal
4242
- pytest
4343
- pytest-xdist
44+
- pytest-mock
4445
- moto==1.3.4
4546
- hypothesis>=3.58.0
4647
- pip:

ci/deps/travis-36-locale.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ dependencies:
3030
# universal
3131
- pytest
3232
- pytest-xdist
33+
- pytest-mock
3334
- moto
3435
- pip:
3536
- hypothesis>=3.58.0

ci/deps/travis-36-slow.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ dependencies:
2727
# universal
2828
- pytest
2929
- pytest-xdist
30+
- pytest-mock
3031
- moto
3132
- hypothesis>=3.58.0

ci/deps/travis-36.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ dependencies:
3636
- pytest
3737
- pytest-xdist
3838
- pytest-cov
39+
- pytest-mock
3940
- hypothesis>=3.58.0
4041
- pip:
4142
- brotlipy

ci/deps/travis-37.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies:
1414
- pytz
1515
- pytest
1616
- pytest-xdist
17+
- pytest-mock
1718
- hypothesis>=3.58.0
1819
- s3fs
1920
- pip:

doc/cheatsheet/Pandas_Cheat_Sheet.pdf

-94 Bytes
Binary file not shown.
274 Bytes
Binary file not shown.
-209 Bytes
Binary file not shown.
204 Bytes
Binary file not shown.

doc/source/reference/arrays.rst

+2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Methods
120120
Timestamp.timetuple
121121
Timestamp.timetz
122122
Timestamp.to_datetime64
123+
Timestamp.to_numpy
123124
Timestamp.to_julian_date
124125
Timestamp.to_period
125126
Timestamp.to_pydatetime
@@ -191,6 +192,7 @@ Methods
191192
Timedelta.round
192193
Timedelta.to_pytimedelta
193194
Timedelta.to_timedelta64
195+
Timedelta.to_numpy
194196
Timedelta.total_seconds
195197

196198
A collection of timedeltas may be stored in a :class:`TimedeltaArray`.

doc/source/user_guide/groupby.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ arbitrary function, for example:
13171317
df.groupby(['Store', 'Product']).pipe(mean)
13181318
13191319
where ``mean`` takes a GroupBy object and finds the mean of the Revenue and Quantity
1320-
columns repectively for each Store-Product combination. The ``mean`` function can
1320+
columns respectively for each Store-Product combination. The ``mean`` function can
13211321
be any function that takes in a GroupBy object; the ``.pipe`` will pass the GroupBy
13221322
object as a parameter into the function you specify.
13231323

doc/source/whatsnew/v0.10.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ Updated PyTables Support
370370
df1.get_dtype_counts()
371371
372372
- performance improvements on table writing
373-
- support for arbitrarly indexed dimensions
373+
- support for arbitrarily indexed dimensions
374374
- ``SparseSeries`` now has a ``density`` property (:issue:`2384`)
375375
- enable ``Series.str.strip/lstrip/rstrip`` methods to take an input argument
376376
to strip arbitrary characters (:issue:`2411`)

doc/source/whatsnew/v0.16.1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ groupby operations on the index will preserve the index nature as well
136136
reindexing operations, will return a resulting index based on the type of the passed
137137
indexer, meaning that passing a list will return a plain-old-``Index``; indexing with
138138
a ``Categorical`` will return a ``CategoricalIndex``, indexed according to the categories
139-
of the PASSED ``Categorical`` dtype. This allows one to arbitrarly index these even with
139+
of the PASSED ``Categorical`` dtype. This allows one to arbitrarily index these even with
140140
values NOT in the categories, similarly to how you can reindex ANY pandas index.
141141

142142
.. code-block:: ipython

doc/source/whatsnew/v0.24.2.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Fixed Regressions
2525
- Fixed regression in :meth:`DataFrame.apply` causing ``RecursionError`` when ``dict``-like classes were passed as argument. (:issue:`25196`)
2626

2727
- Fixed regression in :meth:`DataFrame.duplicated()`, where empty dataframe was not returning a boolean dtyped Series. (:issue:`25184`)
28+
- Fixed regression in :meth:`Series.min` and :meth:`Series.max` where ``numeric_only=True`` was ignored when the ``Series`` contained ```Categorical`` data (:issue:`25299`)
2829

2930
.. _whatsnew_0242.enhancements:
3031

@@ -53,6 +54,7 @@ Bug Fixes
5354

5455
**I/O**
5556

57+
- Better handling of terminal printing when the terminal dimensions are not known (:issue:`25080`);
5658
- Bug in reading a HDF5 table-format ``DataFrame`` created in Python 2, in Python 3 (:issue:`24925`)
5759
- Bug in reading a JSON with ``orient='table'`` generated by :meth:`DataFrame.to_json` with ``index=False`` (:issue:`25170`)
5860
- Bug where float indexes could have misaligned values when printing (:issue:`25061`)
@@ -78,8 +80,8 @@ Bug Fixes
7880

7981
**Reshaping**
8082

81-
-
82-
-
83+
- Bug in :meth:`pandas.core.groupby.GroupBy.transform` where applying a function to a timezone aware column would return a timezone naive result (:issue:`24198`)
84+
- Bug in :func:`DataFrame.join` when joining on a timezone aware :class:`DatetimeIndex` (:issue:`23931`)
8385
-
8486

8587
**Visualization**

doc/source/whatsnew/v0.25.0.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Other Enhancements
2020
^^^^^^^^^^^^^^^^^^
2121

2222
- :meth:`Timestamp.replace` now supports the ``fold`` argument to disambiguate DST transition times (:issue:`25017`)
23-
-
23+
- :meth:`DataFrame.at_time` and :meth:`Series.at_time` now support :meth:`datetime.time` objects with timezones (:issue:`24043`)
2424
-
2525

2626
.. _whatsnew_0250.api_breaking:
@@ -34,6 +34,7 @@ Other API Changes
3434
^^^^^^^^^^^^^^^^^
3535

3636
- :class:`DatetimeTZDtype` will now standardize pytz timezones to a common timezone instance (:issue:`24713`)
37+
- ``Timestamp`` and ``Timedelta`` scalars now implement the :meth:`to_numpy` method as aliases to :meth:`Timestamp.to_datetime64` and :meth:`Timedelta.to_timedelta64`, respectively. (:issue:`24653`)
3738
-
3839
-
3940

@@ -172,7 +173,7 @@ Plotting
172173
Groupby/Resample/Rolling
173174
^^^^^^^^^^^^^^^^^^^^^^^^
174175

175-
-
176+
- Bug in :meth:`pandas.core.resample.Resampler.agg` with a timezone aware index where ``OverflowError`` would raise when passing a list of functions (:issue:`22660`)
176177
-
177178
-
178179

@@ -183,7 +184,6 @@ Reshaping
183184
- Bug in :func:`pandas.merge` adds a string of ``None`` if ``None`` is assigned in suffixes instead of remain the column name as-is (:issue:`24782`).
184185
- Bug in :func:`merge` when merging by index name would sometimes result in an incorrectly numbered index (:issue:`24212`)
185186
- :func:`to_records` now accepts dtypes to its `column_dtypes` parameter (:issue:`24895`)
186-
-
187187

188188

189189
Sparse

0 commit comments

Comments
 (0)