Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pep8 fixes
  • Loading branch information
jaumebonet committed Feb 25, 2018
commit c64392202c76cee8680f08fcd2b75b829e5d90da
11 changes: 4 additions & 7 deletions pandas/tests/frame/test_subclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ def strech(row):
tm.assert_series_equal(result, expected)

def test_frame_subclassing_and_inherit(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of these tests? this is another issue, yes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in a new PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote it to check that that approach would work now. I'll take it out.

# Subclass frame and series and ensure that data can be transfered between them
# on slicing GH#19883
# Subclass frame and series and ensure that data can be transfered
# between them on slicing GH#19883

class CustomSeries(Series):

Expand Down Expand Up @@ -607,7 +607,8 @@ def _constructor(self):
@property
def _constructor_sliced(self):
def f(*args, **kwargs):
return CustomSeries(*args, **kwargs).__finalize__(self, method='_inherit')
return CustomSeries(*args, **kwargs).__finalize__(
self, method='_inherit')
return f

data = {'col1': range(10),
Expand All @@ -622,7 +623,3 @@ def f(*args, **kwargs):
# row
cdf_series = cdf.iloc[0]
assert cdf_series.extra_data == cdf.extra_data