Skip to content

Commit 76e20e9

Browse files
authored
Merge pull request #79 from pandas-dev/master
Sync Fork from Upstream Repo
2 parents 5039c92 + f7bed05 commit 76e20e9

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

doc/source/whatsnew/v1.1.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Numeric
234234
Conversion
235235
^^^^^^^^^^
236236
- Bug in :class:`Series` construction from NumPy array with big-endian ``datetime64`` dtype (:issue:`29684`)
237-
- Bug in :class:`Timedelta` construction with large nanoseconds keyword value (:issue:`34202`)
237+
- Bug in :class:`Timedelta` construction with large nanoseconds keyword value (:issue:`32402`)
238238
-
239239

240240
Strings

pandas/core/groupby/generic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def nunique(self, dropna: bool = True) -> Series:
589589
"""
590590
ids, _, _ = self.grouper.group_info
591591

592-
val = self.obj._internal_get_values()
592+
val = self.obj._values
593593

594594
codes, _ = algorithms.factorize(val, sort=False)
595595
sorter = np.lexsort((codes, ids))
@@ -657,7 +657,7 @@ def value_counts(
657657
)
658658

659659
ids, _, _ = self.grouper.group_info
660-
val = self.obj._internal_get_values()
660+
val = self.obj._values
661661

662662
# groupby removes null keys from groupings
663663
mask = ids != -1
@@ -774,7 +774,7 @@ def count(self) -> Series:
774774
Count of values within each group.
775775
"""
776776
ids, _, ngroups = self.grouper.group_info
777-
val = self.obj._internal_get_values()
777+
val = self.obj._values
778778

779779
mask = (ids != -1) & ~isna(val)
780780
ids = ensure_platform_int(ids)

pandas/plotting/_matplotlib/tools.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
from pandas.core.dtypes.common import is_list_like
1010
from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries
1111

12+
from pandas.plotting._matplotlib import compat
13+
1214

1315
def format_date_labels(ax, rot):
1416
# mini version of autofmt_xdate
@@ -288,20 +290,26 @@ def _remove_labels_from_axis(axis):
288290

289291
def _handle_shared_axes(axarr, nplots, naxes, nrows, ncols, sharex, sharey):
290292
if nplots > 1:
293+
if compat._mpl_ge_3_2_0():
294+
row_num = lambda x: x.get_subplotspec().rowspan.start
295+
col_num = lambda x: x.get_subplotspec().colspan.start
296+
else:
297+
row_num = lambda x: x.rowNum
298+
col_num = lambda x: x.colNum
291299

292300
if nrows > 1:
293301
try:
294302
# first find out the ax layout,
295303
# so that we can correctly handle 'gaps"
296304
layout = np.zeros((nrows + 1, ncols + 1), dtype=np.bool)
297305
for ax in axarr:
298-
layout[ax.rowNum, ax.colNum] = ax.get_visible()
306+
layout[row_num(ax), col_num(ax)] = ax.get_visible()
299307

300308
for ax in axarr:
301309
# only the last row of subplots should get x labels -> all
302310
# other off layout handles the case that the subplot is
303311
# the last in the column, because below is no subplot/gap.
304-
if not layout[ax.rowNum + 1, ax.colNum]:
312+
if not layout[row_num(ax) + 1, col_num(ax)]:
305313
continue
306314
if sharex or len(ax.get_shared_x_axes().get_siblings(ax)) > 1:
307315
_remove_labels_from_axis(ax.xaxis)

0 commit comments

Comments
 (0)