{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11559","repository_url":"https://api.github.com/repos/pydata/pandas","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11559/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11559/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11559/events","html_url":"https://github.com/pydata/pandas/issues/11559","id":115829201,"number":11559,"title":"Subclassing not working as expected","user":{"login":"rserbitar","id":8320468,"avatar_url":"https://avatars.githubusercontent.com/u/8320468?v=3","gravatar_id":"","url":"https://api.github.com/users/rserbitar","html_url":"https://github.com/rserbitar","followers_url":"https://api.github.com/users/rserbitar/followers","following_url":"https://api.github.com/users/rserbitar/following{/other_user}","gists_url":"https://api.github.com/users/rserbitar/gists{/gist_id}","starred_url":"https://api.github.com/users/rserbitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rserbitar/subscriptions","organizations_url":"https://api.github.com/users/rserbitar/orgs","repos_url":"https://api.github.com/users/rserbitar/repos","events_url":"https://api.github.com/users/rserbitar/events{/privacy}","received_events_url":"https://api.github.com/users/rserbitar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Compat","name":"Compat","color":"0052cc"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Difficulty%20Intermediate","name":"Difficulty Intermediate","color":"fbca04"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Effort%20Medium","name":"Effort Medium","color":"006b75"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Indexing","name":"Indexing","color":"0b02e1"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/38","html_url":"https://github.com/pydata/pandas/milestones/0.18.1","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/38/labels","id":1570594,"number":38,"title":"0.18.1","description":"after 0.18.0 of course!","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":192,"closed_issues":158,"state":"open","created_at":"2016-02-08T15:29:59Z","updated_at":"2016-04-15T13:10:39Z","due_on":"2016-04-26T04:00:00Z","closed_at":null},"comments":2,"created_at":"2015-11-09T08:21:53Z","updated_at":"2016-04-15T21:12:55Z","closed_at":null,"body":"Running the code:\r\n\r\n```python\r\nimport pandas\r\n\r\nclass SubclassedSeries(pandas.Series):\r\n    @property\r\n    def _constructor(self):\r\n        return SubclassedSeries\r\n\r\n    @property\r\n    def _constructor_expanddim(self):\r\n        return SubclassedDataFrame\r\n\r\n    def c(self):\r\n        return 1\r\n\r\nclass SubclassedDataFrame(pandas.DataFrame):\r\n    @property\r\n    def _constructor(self):\r\n        return SubclassedDataFrame\r\n\r\n    @property\r\n    def _constructor_sliced(self):\r\n        return SubclassedSeries\r\n\r\n\r\nb = SubclassedDataFrame([[1,2,3,4],[2,3,4,5]])\r\nprint(b[0].c())\r\n```\r\n\r\nworks as expected.\r\n\r\nHowever running:\r\n\r\n```python\r\nprint(b.ix[1].c())\r\n```\r\nthrows an exception as:\r\n\r\n```python\r\nb.ix[1]\r\n```\r\nreturns a Series instance instead of an SublcassedSeries instance as expected."},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/210648231","html_url":"https://github.com/pydata/pandas/issues/11559#issuecomment-210648231","issue_url":"https://api.github.com/repos/pydata/pandas/issues/11559","id":210648231,"user":{"login":"sinhrks","id":1696302,"avatar_url":"https://avatars.githubusercontent.com/u/1696302?v=3","gravatar_id":"","url":"https://api.github.com/users/sinhrks","html_url":"https://github.com/sinhrks","followers_url":"https://api.github.com/users/sinhrks/followers","following_url":"https://api.github.com/users/sinhrks/following{/other_user}","gists_url":"https://api.github.com/users/sinhrks/gists{/gist_id}","starred_url":"https://api.github.com/users/sinhrks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinhrks/subscriptions","organizations_url":"https://api.github.com/users/sinhrks/orgs","repos_url":"https://api.github.com/users/sinhrks/repos","events_url":"https://api.github.com/users/sinhrks/events{/privacy}","received_events_url":"https://api.github.com/users/sinhrks/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T21:12:55Z","updated_at":"2016-04-15T21:12:55Z","body":"This is already fixed on master (maybe by #12787). Needs tests though."}}