{"action":"opened","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11420","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11420/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11420/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11420/events","html_url":"https://github.com/pydata/pandas/issues/11420","id":113069323,"number":11420,"title":"Dropping a column not working in 0.17","user":{"login":"jelmelk","id":14167775,"avatar_url":"https://avatars.githubusercontent.com/u/14167775?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmelk","html_url":"https://github.com/jelmelk","followers_url":"https://api.github.com/users/jelmelk/followers","following_url":"https://api.github.com/users/jelmelk/following{/other_user}","gists_url":"https://api.github.com/users/jelmelk/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmelk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmelk/subscriptions","organizations_url":"https://api.github.com/users/jelmelk/orgs","repos_url":"https://api.github.com/users/jelmelk/repos","events_url":"https://api.github.com/users/jelmelk/events{/privacy}","received_events_url":"https://api.github.com/users/jelmelk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-23T17:57:44Z","updated_at":"2015-10-23T17:57:44Z","closed_at":null,"body":"I'm executing the following code:\r\n\r\n    import pandas as pd\r\n    \r\n    df = pd.read_csv('2015-09-25.csv', header=None,\\\r\n                     names=['ID', 'ORIG', 'LAT', 'LONG', 'CITY', 'STATE', 'TIMESTAMP'], \\\r\n                     parse_dates=['TIMESTAMP'], \\\r\n                     usecols=['ORIG','LAT', 'LONG', 'CITY', 'STATE'])\r\n    \r\n    \r\n    df1 = df[df['ORIG']==1]\r\n    df1.drop(df1.columns[0], inplace=True)\r\n\r\nHowever, the last line will give me this error in 0.17, but works fine with 0.16.2. The 0.17 version of `pandas` is being used with `python 3.5`, while `pandas 0.16.2` is being used with `python 3.4`.\r\n\r\n    Traceback (most recent call last):\r\n      File \"C:/Users/Leb/Desktop/Python/test2.py\", line 29, in <module>\r\n        df.drop(df.columns[0], inplace=True)\r\n      File \"C:\\Program Files\\Python 3.5\\lib\\site-packages\\pandas\\core\\generic.py\", line 1616, in drop\r\n        new_axis = axis.drop(labels, errors=errors)\r\n      File \"C:\\Program Files\\Python 3.5\\lib\\site-packages\\pandas\\core\\index.py\", line 2736, in drop\r\n        raise ValueError('labels %s not contained in axis' % labels[mask])\r\n    ValueError: labels ['ORIG'] not contained in axis\r\n\r\nI've also tried `df1.drop('ORIG', inplace=True)` but the same problem arises. This presist ever with `df`.\r\n\r\nOutput of `df.columns` or `df1.columns` will show:\r\n\r\n    Index(['ORIG', 'LAT', 'LONG', 'CITY', 'STATE'], dtype='object')\r\n    Index(['ORIG', 'LAT', 'LONG', 'CITY', 'STATE'], dtype='object')\r\n\r\nAdding `axis=1` will result in an additional error of:\r\n\r\nSettingWithCopyWarning: \r\nA value is trying to be set on a copy of a slice from a DataFrame\r\n\r\n    SettingWithCopyWarning: \r\n    A value is trying to be set on a copy of a slice from a DataFrame\r\n    \r\n    See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\r\n      df1.drop(df1.columns[0], axis=1, inplace=True)\r\n\r\nThese errors only show up with `python3.5` and `pandas 0.17`."}}