Skip to content

Commit 2081d43

Browse files
Merge remote-tracking branch 'upstream/master' into EA-setitem-regression2
2 parents 417df28 + 06e2793 commit 2081d43

File tree

110 files changed

+1719
-599
lines changed

Some content is hidden

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

110 files changed

+1719
-599
lines changed

asv_bench/benchmarks/tslibs/period.py

+42-18
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
from pandas.tseries.frequencies import to_offset
1111

12-
from .tslib import _sizes
12+
from .tslib import _sizes, _tzs
13+
14+
try:
15+
from pandas._libs.tslibs.vectorized import dt64arr_to_periodarr
16+
except ImportError:
17+
from pandas._libs.tslibs.period import dt64arr_to_periodarr
1318

1419

1520
class PeriodProperties:
@@ -75,26 +80,29 @@ def time_period_constructor(self, freq, is_offset):
7580
Period("2012-06-01", freq=freq)
7681

7782

83+
_freq_ints = [
84+
1000,
85+
1011, # Annual - November End
86+
2000,
87+
2011, # Quarterly - November End
88+
3000,
89+
4000,
90+
4006, # Weekly - Saturday End
91+
5000,
92+
6000,
93+
7000,
94+
8000,
95+
9000,
96+
10000,
97+
11000,
98+
12000,
99+
]
100+
101+
78102
class TimePeriodArrToDT64Arr:
79103
params = [
80104
_sizes,
81-
[
82-
1000,
83-
1011, # Annual - November End
84-
2000,
85-
2011, # Quarterly - November End
86-
3000,
87-
4000,
88-
4006, # Weekly - Saturday End
89-
5000,
90-
6000,
91-
7000,
92-
8000,
93-
9000,
94-
10000,
95-
11000,
96-
12000,
97-
],
105+
_freq_ints,
98106
]
99107
param_names = ["size", "freq"]
100108

@@ -104,3 +112,19 @@ def setup(self, size, freq):
104112

105113
def time_periodarray_to_dt64arr(self, size, freq):
106114
periodarr_to_dt64arr(self.i8values, freq)
115+
116+
117+
class TimeDT64ArrToPeriodArr:
118+
params = [
119+
_sizes,
120+
_freq_ints,
121+
_tzs,
122+
]
123+
param_names = ["size", "freq", "tz"]
124+
125+
def setup(self, size, freq, tz):
126+
arr = np.arange(10, dtype="i8").repeat(size // 10)
127+
self.i8values = arr
128+
129+
def time_dt64arr_to_periodarr(self, size, freq, tz):
130+
dt64arr_to_periodarr(self.i8values, freq, tz)

ci/deps/azure-36-minimum_versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# tools
88
- cython=0.29.16
9-
- pytest>=5.0.1, <6.0.0rc0
9+
- pytest=5.0.1
1010
- pytest-xdist>=1.21
1111
- hypothesis>=3.58.0
1212
- pytest-azurepipelines

ci/deps/azure-37-locale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818
- ipython
1919
- jinja2
2020
- lxml
21-
- matplotlib
21+
- matplotlib <3.3.0
2222
- moto
2323
- nomkl
2424
- numexpr

doc/source/reference/groupby.rst

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ The following methods are available only for ``SeriesGroupBy`` objects.
128128
.. autosummary::
129129
:toctree: api/
130130

131+
SeriesGroupBy.hist
131132
SeriesGroupBy.nlargest
132133
SeriesGroupBy.nsmallest
133134
SeriesGroupBy.nunique

doc/source/reference/offset_frequency.rst

+18
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Methods
3333
:toctree: api/
3434

3535
DateOffset.apply
36+
DateOffset.apply_index
3637
DateOffset.copy
3738
DateOffset.isAnchored
3839
DateOffset.onOffset
@@ -117,6 +118,7 @@ Methods
117118
:toctree: api/
118119

119120
BusinessHour.apply
121+
BusinessHour.apply_index
120122
BusinessHour.copy
121123
BusinessHour.isAnchored
122124
BusinessHour.onOffset
@@ -201,6 +203,7 @@ Methods
201203
:toctree: api/
202204

203205
CustomBusinessHour.apply
206+
CustomBusinessHour.apply_index
204207
CustomBusinessHour.copy
205208
CustomBusinessHour.isAnchored
206209
CustomBusinessHour.onOffset
@@ -401,6 +404,7 @@ Methods
401404
:toctree: api/
402405

403406
CustomBusinessMonthEnd.apply
407+
CustomBusinessMonthEnd.apply_index
404408
CustomBusinessMonthEnd.copy
405409
CustomBusinessMonthEnd.isAnchored
406410
CustomBusinessMonthEnd.onOffset
@@ -447,6 +451,7 @@ Methods
447451
:toctree: api/
448452

449453
CustomBusinessMonthBegin.apply
454+
CustomBusinessMonthBegin.apply_index
450455
CustomBusinessMonthBegin.copy
451456
CustomBusinessMonthBegin.isAnchored
452457
CustomBusinessMonthBegin.onOffset
@@ -586,6 +591,7 @@ Methods
586591
:toctree: api/
587592

588593
WeekOfMonth.apply
594+
WeekOfMonth.apply_index
589595
WeekOfMonth.copy
590596
WeekOfMonth.isAnchored
591597
WeekOfMonth.onOffset
@@ -622,6 +628,7 @@ Methods
622628
:toctree: api/
623629

624630
LastWeekOfMonth.apply
631+
LastWeekOfMonth.apply_index
625632
LastWeekOfMonth.copy
626633
LastWeekOfMonth.isAnchored
627634
LastWeekOfMonth.onOffset
@@ -938,6 +945,7 @@ Methods
938945
:toctree: api/
939946

940947
FY5253.apply
948+
FY5253.apply_index
941949
FY5253.copy
942950
FY5253.get_rule_code_suffix
943951
FY5253.get_year_end
@@ -977,6 +985,7 @@ Methods
977985
:toctree: api/
978986

979987
FY5253Quarter.apply
988+
FY5253Quarter.apply_index
980989
FY5253Quarter.copy
981990
FY5253Quarter.get_rule_code_suffix
982991
FY5253Quarter.get_weeks
@@ -1013,6 +1022,7 @@ Methods
10131022
:toctree: api/
10141023

10151024
Easter.apply
1025+
Easter.apply_index
10161026
Easter.copy
10171027
Easter.isAnchored
10181028
Easter.onOffset
@@ -1053,6 +1063,7 @@ Methods
10531063
Tick.is_on_offset
10541064
Tick.__call__
10551065
Tick.apply
1066+
Tick.apply_index
10561067

10571068
Day
10581069
---
@@ -1087,6 +1098,7 @@ Methods
10871098
Day.is_on_offset
10881099
Day.__call__
10891100
Day.apply
1101+
Day.apply_index
10901102

10911103
Hour
10921104
----
@@ -1121,6 +1133,7 @@ Methods
11211133
Hour.is_on_offset
11221134
Hour.__call__
11231135
Hour.apply
1136+
Hour.apply_index
11241137

11251138
Minute
11261139
------
@@ -1155,6 +1168,7 @@ Methods
11551168
Minute.is_on_offset
11561169
Minute.__call__
11571170
Minute.apply
1171+
Minute.apply_index
11581172

11591173
Second
11601174
------
@@ -1189,6 +1203,7 @@ Methods
11891203
Second.is_on_offset
11901204
Second.__call__
11911205
Second.apply
1206+
Second.apply_index
11921207

11931208
Milli
11941209
-----
@@ -1223,6 +1238,7 @@ Methods
12231238
Milli.is_on_offset
12241239
Milli.__call__
12251240
Milli.apply
1241+
Milli.apply_index
12261242

12271243
Micro
12281244
-----
@@ -1257,6 +1273,7 @@ Methods
12571273
Micro.is_on_offset
12581274
Micro.__call__
12591275
Micro.apply
1276+
Micro.apply_index
12601277

12611278
Nano
12621279
----
@@ -1291,6 +1308,7 @@ Methods
12911308
Nano.is_on_offset
12921309
Nano.__call__
12931310
Nano.apply
1311+
Nano.apply_index
12941312

12951313
.. _api.frequencies:
12961314

doc/source/reference/window.rst

+1
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,4 @@ Base class for defining custom window boundaries.
8686

8787
api.indexers.BaseIndexer
8888
api.indexers.FixedForwardWindowIndexer
89+
api.indexers.VariableOffsetWindowIndexer

doc/source/user_guide/visualization.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ Horizontal and vertical error bars can be supplied to the ``xerr`` and ``yerr``
14251425
* As a ``str`` indicating which of the columns of plotting :class:`DataFrame` contain the error values.
14261426
* As raw values (``list``, ``tuple``, or ``np.ndarray``). Must be the same length as the plotting :class:`DataFrame`/:class:`Series`.
14271427

1428-
Asymmetrical error bars are also supported, however raw error values must be provided in this case. For a ``M`` length :class:`Series`, a ``Mx2`` array should be provided indicating lower and upper (or left and right) errors. For a ``MxN`` :class:`DataFrame`, asymmetrical errors should be in a ``Mx2xN`` array.
1428+
Asymmetrical error bars are also supported, however raw error values must be provided in this case. For a ``N`` length :class:`Series`, a ``2xN`` array should be provided indicating lower and upper (or left and right) errors. For a ``MxN`` :class:`DataFrame`, asymmetrical errors should be in a ``Mx2xN`` array.
14291429

14301430
Here is an example of one way to easily plot group means with standard deviations from the raw data.
14311431

0 commit comments

Comments
 (0)