Skip to content

Commit c7b299e

Browse files
committed
cleanup debugging
1 parent 5fd97d9 commit c7b299e

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

doc/source/whatsnew/v0.19.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ Bug Fixes
948948
- Bug in ``pd.read_hdf()`` returns incorrect result when a ``DataFrame`` with a ``categorical`` column and a query which doesn't match any values (:issue:`13792`)
949949
- Bug in ``pd.to_datetime()`` raise ``AttributeError`` with NaN and the other string is not valid when errors='ignore' (:issue:`12424`)
950950

951-
951+
- Bug in ``groupby`` where a ``TimeGrouper`` selection is used with the ``key`` or ``level`` arguments with a ``PeriodIndex`` (:issue:`14008`)
952952
- Bug in ``Series`` comparison operators when dealing with zero dim NumPy arrays (:issue:`13006`)
953953
- Bug in ``groupby`` where ``apply`` returns different result depending on whether first result is ``None`` or not (:issue:`12824`)
954954
- Bug in ``groupby(..).nth()`` where the group key is included inconsistently if called after ``.head()/.tail()`` (:issue:`12839`)

pandas/tseries/resample.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -719,10 +719,10 @@ def _upsample(self, method, limit=None):
719719
if self.axis:
720720
raise AssertionError('axis must be 0')
721721
if self.from_selection:
722-
raise NotImplementedError("Upsampling from level= or on= selection "
723-
"is not supported, use .set_index(...) "
724-
"to explicitly set index to "
725-
"datetime-like")
722+
raise NotImplementedError("Upsampling from level= or on= selection"
723+
" is not supported, use .set_index(...)"
724+
" to explicitly set index to"
725+
" datetime-like")
726726

727727
ax = self.ax
728728
obj = self._selected_obj
@@ -864,12 +864,11 @@ def _upsample(self, method, limit=None):
864864
.fillna
865865
866866
"""
867-
# import pdb; pdb.set_trace()
868867
if self.from_selection:
869-
raise NotImplementedError("Upsampling from level= or on= selection "
870-
"is not supported, use .set_index(...) "
871-
"to explicitly set index to "
872-
"datetime-like")
868+
raise NotImplementedError("Upsampling from level= or on= selection"
869+
" is not supported, use .set_index(...)"
870+
" to explicitly set index to"
871+
" datetime-like")
873872
# we may need to actually resample as if we are timestamps
874873
if self.kind == 'timestamp':
875874
return super(PeriodIndexResampler, self)._upsample(method,

pandas/tseries/tests/test_resample.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ def test_agg_consistency(self):
386386
assert_frame_equal(result, expected)
387387

388388

389-
390-
391389
class Base(object):
392390
"""
393391
base class for resampling testing, calling
@@ -515,7 +513,6 @@ def test_agg(self):
515513
columns=list('AB'),
516514
index=index)
517515
df_col = df.reset_index()
518-
print df_col
519516
df_mult = df_col.copy()
520517
df_mult.index = pd.MultiIndex.from_arrays([range(10), df.index],
521518
names=['index', 'date'])
@@ -733,11 +730,11 @@ def test_selection_api_validation(self):
733730
index = self.create_series().index
734731
df = pd.DataFrame({'date': index,
735732
'a': np.arange(len(index), dtype=np.int64)},
736-
index=pd.MultiIndex.from_arrays([
737-
np.arange(len(index), dtype=np.int64),
738-
index], names=['v', 'd']))
733+
index=pd.MultiIndex.from_arrays([
734+
np.arange(len(index), dtype=np.int64),
735+
index], names=['v', 'd']))
739736
df_exp = pd.DataFrame({'a': np.arange(len(index), dtype=np.int64)},
740-
index=index)
737+
index=index)
741738

742739
# non DatetimeIndex
743740
with tm.assertRaises(TypeError):

0 commit comments

Comments
 (0)