Skip to content

Commit db214b6

Browse files
Merge remote-tracking branch 'upstream/master' into fix_issue_16748
2 parents 193eb2c + 9dc4d71 commit db214b6

File tree

12 files changed

+144
-40
lines changed

12 files changed

+144
-40
lines changed

doc/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@
315315
import numpy as np
316316
import pandas as pd
317317
318-
randn = np.random.randn
319318
np.random.seed(123456)
320319
np.set_printoptions(precision=4, suppress=True)
321320
pd.options.display.max_rows = 15

doc/source/whatsnew/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 0.25
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v0.25.2
2728
v0.25.1
2829
v0.25.0
2930

doc/source/whatsnew/v0.10.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ Here is a taste of what to expect.
498498

499499
.. code-block:: ipython
500500
501-
In [58]: p4d = Panel4D(randn(2, 2, 5, 4),
501+
In [58]: p4d = Panel4D(np.random.randn(2, 2, 5, 4),
502502
....: labels=['Label1','Label2'],
503503
....: items=['Item1', 'Item2'],
504504
....: major_axis=date_range('1/1/2000', periods=5),

doc/source/whatsnew/v0.25.2.rst

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
.. _whatsnew_0252:
2+
3+
What's new in 0.25.2 (October XX, 2019)
4+
---------------------------------------
5+
6+
These are the changes in pandas 0.25.2. See :ref:`release` for a full changelog
7+
including other versions of pandas.
8+
9+
.. _whatsnew_0252.bug_fixes:
10+
11+
Bug fixes
12+
~~~~~~~~~
13+
14+
Categorical
15+
^^^^^^^^^^^
16+
17+
-
18+
19+
Datetimelike
20+
^^^^^^^^^^^^
21+
22+
-
23+
-
24+
-
25+
26+
Timezones
27+
^^^^^^^^^
28+
29+
-
30+
31+
Numeric
32+
^^^^^^^
33+
34+
-
35+
-
36+
-
37+
-
38+
39+
Conversion
40+
^^^^^^^^^^
41+
42+
-
43+
44+
Interval
45+
^^^^^^^^
46+
47+
-
48+
49+
Indexing
50+
^^^^^^^^
51+
52+
-
53+
-
54+
-
55+
-
56+
57+
Missing
58+
^^^^^^^
59+
60+
-
61+
62+
I/O
63+
^^^
64+
65+
-
66+
-
67+
-
68+
69+
Plotting
70+
^^^^^^^^
71+
72+
-
73+
-
74+
-
75+
76+
Groupby/resample/rolling
77+
^^^^^^^^^^^^^^^^^^^^^^^^
78+
79+
-
80+
-
81+
-
82+
-
83+
-
84+
85+
Reshaping
86+
^^^^^^^^^
87+
88+
-
89+
-
90+
-
91+
-
92+
-
93+
94+
Sparse
95+
^^^^^^
96+
97+
-
98+
99+
Other
100+
^^^^^
101+
102+
-
103+
-
104+
105+
.. _whatsnew_0.252.contributors:
106+
107+
Contributors
108+
~~~~~~~~~~~~
109+
110+
.. contributors:: v0.25.1..HEAD

pandas/core/arrays/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def fillna(self, value=None, method=None, limit=None):
514514

515515
def dropna(self):
516516
"""
517-
Return ExtensionArray without NA values
517+
Return ExtensionArray without NA values.
518518
519519
Returns
520520
-------
@@ -957,7 +957,7 @@ def _concat_same_type(
957957
cls, to_concat: Sequence[ABCExtensionArray]
958958
) -> ABCExtensionArray:
959959
"""
960-
Concatenate multiple array
960+
Concatenate multiple array.
961961
962962
Parameters
963963
----------

pandas/core/arrays/datetimes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ def tz_localize(self, tz, ambiguous="raise", nonexistent="raise", errors=None):
11581158
def to_pydatetime(self):
11591159
"""
11601160
Return Datetime Array/Index as object ndarray of datetime.datetime
1161-
objects
1161+
objects.
11621162
11631163
Returns
11641164
-------
@@ -1283,7 +1283,7 @@ def to_perioddelta(self, freq):
12831283
"""
12841284
Calculate TimedeltaArray of difference between index
12851285
values and index converted to PeriodArray at specified
1286-
freq. Used for vectorized offsets
1286+
freq. Used for vectorized offsets.
12871287
12881288
Parameters
12891289
----------

pandas/core/arrays/period.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def __array__(self, dtype=None):
426426
@property
427427
def is_leap_year(self):
428428
"""
429-
Logical indicating if the date belongs to a leap year
429+
Logical indicating if the date belongs to a leap year.
430430
"""
431431
return isleapyear_arr(np.asarray(self.year))
432432

pandas/core/groupby/groupby.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2370,8 +2370,9 @@ def head(self, n=5):
23702370
"""
23712371
Return first n rows of each group.
23722372
2373-
Essentially equivalent to ``.apply(lambda x: x.head(n))``,
2374-
except ignores as_index flag.
2373+
Similar to ``.apply(lambda x: x.head(n))``, but it returns a subset of rows
2374+
from the original DataFrame with original index and order preserved
2375+
(``as_index`` flag is ignored).
23752376
23762377
Returns
23772378
-------
@@ -2382,10 +2383,6 @@ def head(self, n=5):
23822383
23832384
>>> df = pd.DataFrame([[1, 2], [1, 4], [5, 6]],
23842385
... columns=['A', 'B'])
2385-
>>> df.groupby('A', as_index=False).head(1)
2386-
A B
2387-
0 1 2
2388-
2 5 6
23892386
>>> df.groupby('A').head(1)
23902387
A B
23912388
0 1 2
@@ -2401,8 +2398,9 @@ def tail(self, n=5):
24012398
"""
24022399
Return last n rows of each group.
24032400
2404-
Essentially equivalent to ``.apply(lambda x: x.tail(n))``,
2405-
except ignores as_index flag.
2401+
Similar to ``.apply(lambda x: x.tail(n))``, but it returns a subset of rows
2402+
from the original DataFrame with original index and order preserved
2403+
(``as_index`` flag is ignored).
24062404
24072405
Returns
24082406
-------
@@ -2417,10 +2415,6 @@ def tail(self, n=5):
24172415
A B
24182416
1 a 2
24192417
3 b 2
2420-
>>> df.groupby('A').head(1)
2421-
A B
2422-
0 a 1
2423-
2 b 1
24242418
"""
24252419
self._reset_group_selection()
24262420
mask = self._cumcount_array(ascending=False) < n

pandas/core/indexes/datetimes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ def _get_time_micros(self):
661661
def to_series(self, keep_tz=None, index=None, name=None):
662662
"""
663663
Create a Series with both index and values equal to the index keys
664-
useful with map for returning an indexer based on an index
664+
useful with map for returning an indexer based on an index.
665665
666666
Parameters
667667
----------
@@ -687,10 +687,10 @@ def to_series(self, keep_tz=None, index=None, name=None):
687687
behaviour and silence the warning.
688688
689689
index : Index, optional
690-
index of resulting Series. If None, defaults to original index
691-
name : string, optional
692-
name of resulting Series. If None, defaults to name of original
693-
index
690+
Index of resulting Series. If None, defaults to original index.
691+
name : str, optional
692+
Name of resulting Series. If None, defaults to name of original
693+
index.
694694
695695
Returns
696696
-------
@@ -735,7 +735,7 @@ def to_series(self, keep_tz=None, index=None, name=None):
735735

736736
def snap(self, freq="S"):
737737
"""
738-
Snap time stamps to nearest occurring frequency
738+
Snap time stamps to nearest occurring frequency.
739739
740740
Returns
741741
-------

pandas/core/indexes/multi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ def _set_names(self, names, level=None, validate=True):
12501250
self.levels[l].rename(name, inplace=True)
12511251

12521252
names = property(
1253-
fset=_set_names, fget=_get_names, doc="""\nNames of levels in MultiIndex\n"""
1253+
fset=_set_names, fget=_get_names, doc="""\nNames of levels in MultiIndex.\n"""
12541254
)
12551255

12561256
@Appender(_index_shared_docs["_get_grouper_for_level"])
@@ -1762,7 +1762,7 @@ def is_all_dates(self):
17621762

17631763
def is_lexsorted(self):
17641764
"""
1765-
Return True if the codes are lexicographically sorted
1765+
Return True if the codes are lexicographically sorted.
17661766
17671767
Returns
17681768
-------
@@ -2246,7 +2246,7 @@ def swaplevel(self, i=-2, j=-1):
22462246

22472247
def reorder_levels(self, order):
22482248
"""
2249-
Rearrange levels using input order. May not drop or duplicate levels
2249+
Rearrange levels using input order. May not drop or duplicate levels.
22502250
22512251
Parameters
22522252
----------

0 commit comments

Comments
 (0)