{"action":"created","issue":{"url":"https://api.github.com/repos/ucd-cws/arcproject-wq-processing/issues/45","repository_url":"https://api.github.com/repos/ucd-cws/arcproject-wq-processing","labels_url":"https://api.github.com/repos/ucd-cws/arcproject-wq-processing/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/ucd-cws/arcproject-wq-processing/issues/45/comments","events_url":"https://api.github.com/repos/ucd-cws/arcproject-wq-processing/issues/45/events","html_url":"https://github.com/ucd-cws/arcproject-wq-processing/issues/45","id":194712384,"number":45,"title":"FutureWarning: convert_objects is deprecated in gain code","user":{"login":"nickrsan","id":684849,"avatar_url":"https://avatars.githubusercontent.com/u/684849?v=3","gravatar_id":"","url":"https://api.github.com/users/nickrsan","html_url":"https://github.com/nickrsan","followers_url":"https://api.github.com/users/nickrsan/followers","following_url":"https://api.github.com/users/nickrsan/following{/other_user}","gists_url":"https://api.github.com/users/nickrsan/gists{/gist_id}","starred_url":"https://api.github.com/users/nickrsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickrsan/subscriptions","organizations_url":"https://api.github.com/users/nickrsan/orgs","repos_url":"https://api.github.com/users/nickrsan/repos","events_url":"https://api.github.com/users/nickrsan/events{/privacy}","received_events_url":"https://api.github.com/users/nickrsan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"andybell","id":7776675,"avatar_url":"https://avatars.githubusercontent.com/u/7776675?v=3","gravatar_id":"","url":"https://api.github.com/users/andybell","html_url":"https://github.com/andybell","followers_url":"https://api.github.com/users/andybell/followers","following_url":"https://api.github.com/users/andybell/following{/other_user}","gists_url":"https://api.github.com/users/andybell/gists{/gist_id}","starred_url":"https://api.github.com/users/andybell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andybell/subscriptions","organizations_url":"https://api.github.com/users/andybell/orgs","repos_url":"https://api.github.com/users/andybell/repos","events_url":"https://api.github.com/users/andybell/events{/privacy}","received_events_url":"https://api.github.com/users/andybell/received_events","type":"User","site_admin":false},"assignees":[{"login":"andybell","id":7776675,"avatar_url":"https://avatars.githubusercontent.com/u/7776675?v=3","gravatar_id":"","url":"https://api.github.com/users/andybell","html_url":"https://github.com/andybell","followers_url":"https://api.github.com/users/andybell/followers","following_url":"https://api.github.com/users/andybell/following{/other_user}","gists_url":"https://api.github.com/users/andybell/gists{/gist_id}","starred_url":"https://api.github.com/users/andybell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andybell/subscriptions","organizations_url":"https://api.github.com/users/andybell/orgs","repos_url":"https://api.github.com/users/andybell/repos","events_url":"https://api.github.com/users/andybell/events{/privacy}","received_events_url":"https://api.github.com/users/andybell/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-12-09T22:27:22Z","updated_at":"2016-12-17T00:44:29Z","closed_at":null,"body":"Hey Andy,\r\n\r\nWhen running the unittest suite on my computer (pandas 0.17), I get FutureWarning: convert_objects is deprecated during one of the unittests (either ConvertType or LoadGainWQ in test_gain_unittest). It's referencing the code in wq_gain.convert_wq_dtypes:\r\n\r\n```\r\ndef convert_wq_dtypes(df):  # TODO check to see if the wq_from_file function can do this\r\n\t\"\"\"\r\n\tConverts all the strings in dataframe into numeric (pd.to_numeric introduced in 0.17 so can't use that)\r\n\t:param df:\r\n\t:return: dataframe with columns converted to numeric\r\n\t\"\"\"\r\n\tfor column in list(df.columns.values):\r\n\t\tif df[column].dtype == object:\r\n\t\t\tdf[column] = df[column].convert_objects(convert_numeric=True)\r\n\treturn df\r\n```\r\n\r\nIt seems to not be formatting the code correctly - me-fail\r\n\r\nThe full warning is:\r\nC:\\Users\\dsx.AD3\\Code\\arcproject-wq-processing\\scripts\\wq_gain.py:17: FutureWarning: convert_objects is deprecated.  Use the data-type specific converters pd.to_datetime, pd.to_timedelta and pd.to_numeric.\r\n  df[column] = df[column].convert_objects(convert_numeric=True)\r\n\r\nIt seems worth updating to a supported method to future proof it? What do you think?"},"comment":{"url":"https://api.github.com/repos/ucd-cws/arcproject-wq-processing/issues/comments/267729930","html_url":"https://github.com/ucd-cws/arcproject-wq-processing/issues/45#issuecomment-267729930","issue_url":"https://api.github.com/repos/ucd-cws/arcproject-wq-processing/issues/45","id":267729930,"user":{"login":"nickrsan","id":684849,"avatar_url":"https://avatars.githubusercontent.com/u/684849?v=3","gravatar_id":"","url":"https://api.github.com/users/nickrsan","html_url":"https://github.com/nickrsan","followers_url":"https://api.github.com/users/nickrsan/followers","following_url":"https://api.github.com/users/nickrsan/following{/other_user}","gists_url":"https://api.github.com/users/nickrsan/gists{/gist_id}","starred_url":"https://api.github.com/users/nickrsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickrsan/subscriptions","organizations_url":"https://api.github.com/users/nickrsan/orgs","repos_url":"https://api.github.com/users/nickrsan/repos","events_url":"https://api.github.com/users/nickrsan/events{/privacy}","received_events_url":"https://api.github.com/users/nickrsan/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T00:44:29Z","updated_at":"2016-12-17T00:44:29Z","body":"Grrr, looks like this is a version-based thing too - in pandas 0.17 it's deprecated, but in pandas 0.16.2, the resolution of pd.to_numeric(data_frame[field]) doesn't exist. So we'll need to do some version matching in the code (I have another spot doing similar work in check_and_convert_units - wqt_timestamp_match line 119). Just noting here so that we get both spots compatible with each version"}}
{"actor":{"display_login":"nickrsan"}}