We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running the code:
import pandas class SubclassedSeries(pandas.Series): @property def _constructor(self): return SubclassedSeries @property def _constructor_expanddim(self): return SubclassedDataFrame def c(self): return 1 class SubclassedDataFrame(pandas.DataFrame): @property def _constructor(self): return SubclassedDataFrame @property def _constructor_sliced(self): return SubclassedSeries b = SubclassedDataFrame([[1,2,3,4],[2,3,4,5]]) print(b[0].c())
works as expected.
However running:
print(b.ix[1].c())
throws an exception as:
b.ix[1]
returns a Series instance instead of an SublcassedSeries instance as expected.
The text was updated successfully, but these errors were encountered:
ok, subclassing is not recommended, see docs here, but would take a pull-request to fully test out the indexers (as this is not currently done).
Sorry, something went wrong.
This is already fixed on master (maybe by #12787). Needs tests though.
e0ee3a1
The lack of subclassing makes it difficult and/or fragile to extend the package in any way. It's really unfortunate.
Successfully merging a pull request may close this issue.
Running the code:
works as expected.
However running:
throws an exception as:
returns a Series instance instead of an SublcassedSeries instance as expected.
The text was updated successfully, but these errors were encountered: