{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/24458","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24458/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24458/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24458/events","html_url":"https://github.com/pandas-dev/pandas/pull/24458","id":394514470,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMjQyMTcx","number":24458,"title":"BUG: clip doesn't preserve dtype by column","user":{"login":"minggli","id":14131823,"node_id":"MDQ6VXNlcjE0MTMxODIz","avatar_url":"https://avatars0.githubusercontent.com/u/14131823?v=4","gravatar_id":"","url":"https://api.github.com/users/minggli","html_url":"https://github.com/minggli","followers_url":"https://api.github.com/users/minggli/followers","following_url":"https://api.github.com/users/minggli/following{/other_user}","gists_url":"https://api.github.com/users/minggli/gists{/gist_id}","starred_url":"https://api.github.com/users/minggli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minggli/subscriptions","organizations_url":"https://api.github.com/users/minggli/orgs","repos_url":"https://api.github.com/users/minggli/repos","events_url":"https://api.github.com/users/minggli/events{/privacy}","received_events_url":"https://api.github.com/users/minggli/received_events","type":"User","site_admin":false},"labels":[{"id":76811,"node_id":"MDU6TGFiZWw3NjgxMQ==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Bug","name":"Bug","color":"e10c02","default":false},{"id":31404521,"node_id":"MDU6TGFiZWwzMTQwNDUyMQ==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Dtypes","name":"Dtypes","color":"e102d8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pandas-dev/pandas/milestones/55","html_url":"https://github.com/pandas-dev/pandas/milestone/55","labels_url":"https://api.github.com/repos/pandas-dev/pandas/milestones/55/labels","id":3228419,"node_id":"MDk6TWlsZXN0b25lMzIyODQxOQ==","number":55,"title":"0.24.0","description":"","creator":{"login":"jorisvandenbossche","id":1020496,"node_id":"MDQ6VXNlcjEwMjA0OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/1020496?v=4","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"open_issues":39,"closed_issues":1714,"state":"open","created_at":"2018-03-29T12:00:12Z","updated_at":"2018-12-28T19:03:31Z","due_on":"2018-12-31T08:00:00Z","closed_at":null},"comments":10,"created_at":"2018-12-28T00:09:06Z","updated_at":"2018-12-28T19:03:33Z","closed_at":"2018-12-28T19:03:31Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/24458","html_url":"https://github.com/pandas-dev/pandas/pull/24458","diff_url":"https://github.com/pandas-dev/pandas/pull/24458.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/24458.patch"},"body":"- [x] closes #24162\r\n- [x] tests added / passed\r\n- [x] passes `git diff upstream/master -u -- \"*.py\" | flake8 --diff`\r\n- [x] whatsnew entry\r\n\r\n```python3\r\n>>> import pandas as pd\r\n>>> data = pd.DataFrame([[1, 2], [3, 4]], columns=['int1', 'int2'])\r\n>>> data.clip_upper(1)\r\n__main__:1: FutureWarning: clip_upper(threshold) is deprecated, use clip(upper=threshold) instead\r\n   int1  int2\r\n0     1     1\r\n1     1     1\r\n```\r\n**Before**\r\n```python3\r\n>>> data['float'] = data['int1'].astype(float)\r\n>>> data.clip_upper(1)\r\n   int1  int2  float\r\n0   1.0   1.0    1.0\r\n1   1.0   1.0    1.0\r\n```\r\n**After**\r\n```python3\r\n>>> data['float'] = data['int1'].astype(float)\r\n>>> data.clip_upper(1)\r\n   int1  int2  float\r\n0     1     1    1.0\r\n1     1     1    1.0\r\n```"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/450410703","html_url":"https://github.com/pandas-dev/pandas/pull/24458#issuecomment-450410703","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24458","id":450410703,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDQxMDcwMw==","user":{"login":"jreback","id":953992,"node_id":"MDQ6VXNlcjk1Mzk5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/953992?v=4","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},"created_at":"2018-12-28T19:03:33Z","updated_at":"2018-12-28T19:03:33Z","author_association":"CONTRIBUTOR","body":"thanks @minggli "}}
{"actor":{"display_login":"jreback"}}