{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/9250","labels_url":"https://api.github.com/repos/pydata/pandas/issues/9250/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/9250/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/9250/events","html_url":"https://github.com/pydata/pandas/issues/9250","id":54338376,"number":9250,"title":"Setting with enlargement fails in presence of MultiIndex","user":{"login":"FedericoV","id":630134,"avatar_url":"https://avatars.githubusercontent.com/u/630134?v=3","gravatar_id":"","url":"https://api.github.com/users/FedericoV","html_url":"https://github.com/FedericoV","followers_url":"https://api.github.com/users/FedericoV/followers","following_url":"https://api.github.com/users/FedericoV/following{/other_user}","gists_url":"https://api.github.com/users/FedericoV/gists{/gist_id}","starred_url":"https://api.github.com/users/FedericoV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FedericoV/subscriptions","organizations_url":"https://api.github.com/users/FedericoV/orgs","repos_url":"https://api.github.com/users/FedericoV/repos","events_url":"https://api.github.com/users/FedericoV/events{/privacy}","received_events_url":"https://api.github.com/users/FedericoV/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-14T15:56:18Z","updated_at":"2015-01-14T17:40:12Z","closed_at":null,"body":"```\r\nIn [1]:\r\n\r\nimport pandas as pd\r\nimport numpy as np\r\n \r\nprint pd.__version__\r\n \r\na = np.linspace(0, 10, 11)\r\nidx = [('test1', i) for i in range(5)]\r\nidx.extend([('test2', i) for i in range(6)])\r\n \r\nidx = pd.MultiIndex.from_tuples(idx)\r\n0.15.2-80-ge69deae\r\nIn [2]:\r\n\r\na = pd.Series(a, idx)\r\na\r\nOut[2]:\r\ntest1  0     0\r\n       1     1\r\n       2     2\r\n       3     3\r\n       4     4\r\ntest2  0     5\r\n       1     6\r\n       2     7\r\n       3     8\r\n       4     9\r\n       5    10\r\ndtype: float64\r\nIn [3]:\r\n\r\na.loc[('test1', 2)] = 13\r\na\r\nOut[3]:\r\ntest1  0     0\r\n       1     1\r\n       2    13\r\n       3     3\r\n       4     4\r\ntest2  0     5\r\n       1     6\r\n       2     7\r\n       3     8\r\n       4     9\r\n       5    10\r\ndtype: float64\r\nIn [4]:\r\n\r\na.loc[('test', 17)] = 13\r\n---------------------------------------------------------------------------\r\nIndexingError                             Traceback (most recent call last)\r\n<ipython-input-4-157acf13152f> in <module>()\r\n----> 1 a.loc[('test', 17)] = 13\r\n\r\n/home/federico/Python_Libraries/pandas/pandas/core/indexing.pyc in __setitem__(self, key, value)\r\n    114                 if len(key) > self.ndim:\r\n    115                     raise IndexingError('only tuples of length <= %d supported' %\r\n--> 116                                         self.ndim)\r\n    117                 indexer = self._convert_tuple(key, is_setter=True)\r\n    118             else:\r\n\r\nIndexingError: only tuples of length <= 1 supported\r\n\r\nIn [5]:\r\n\r\na.ix[('test', 17)] = 13\r\n---------------------------------------------------------------------------\r\nIndexingError                             Traceback (most recent call last)\r\n<ipython-input-5-89467846f8af> in <module>()\r\n----> 1 a.ix[('test', 17)] = 13\r\n\r\n/home/federico/Python_Libraries/pandas/pandas/core/indexing.pyc in __setitem__(self, key, value)\r\n    114                 if len(key) > self.ndim:\r\n    115                     raise IndexingError('only tuples of length <= %d supported' %\r\n--> 116                                         self.ndim)\r\n    117                 indexer = self._convert_tuple(key, is_setter=True)\r\n    118             else:\r\n\r\nIndexingError: only tuples of length <= 1 supported\r\n```\r\n\r\nSomehow - the enlarging fails.  Any clue how to get it to work?  I have also noticed that the 'fast' indexing methods, iat and at fail with DataFrames that are multi indexed."},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/69957234","html_url":"https://github.com/pydata/pandas/issues/9250#issuecomment-69957234","issue_url":"https://api.github.com/repos/pydata/pandas/issues/9250","id":69957234,"user":{"login":"FedericoV","id":630134,"avatar_url":"https://avatars.githubusercontent.com/u/630134?v=3","gravatar_id":"","url":"https://api.github.com/users/FedericoV","html_url":"https://github.com/FedericoV","followers_url":"https://api.github.com/users/FedericoV/followers","following_url":"https://api.github.com/users/FedericoV/following{/other_user}","gists_url":"https://api.github.com/users/FedericoV/gists{/gist_id}","starred_url":"https://api.github.com/users/FedericoV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FedericoV/subscriptions","organizations_url":"https://api.github.com/users/FedericoV/orgs","repos_url":"https://api.github.com/users/FedericoV/repos","events_url":"https://api.github.com/users/FedericoV/events{/privacy}","received_events_url":"https://api.github.com/users/FedericoV/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T17:40:12Z","updated_at":"2015-01-14T17:40:12Z","body":"I will do that asap tomorrow, since it was on my machine at work and I\r\ncannot SSH.  However, it was the very last version, pulled from master and\r\nbuilt ~1 minute before posting that issue.\r\n\r\nOn Wed, Jan 14, 2015 at 5:51 PM, jreback <notifications@github.com> wrote:\r\n\r\n> pls pd.show_versions()\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/pydata/pandas/issues/9250#issuecomment-69948321>.\r\n>"}}