{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/21653","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21653/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21653/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21653/events","html_url":"https://github.com/pandas-dev/pandas/issues/21653","id":336170533,"node_id":"MDU6SXNzdWUzMzYxNzA1MzM=","number":21653,"title":"CLN/API: is_string_dtype should infer","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},"labels":[{"id":35818298,"node_id":"MDU6TGFiZWwzNTgxODI5OA==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design","name":"API Design","color":"AD7FA8","default":false},{"id":211029535,"node_id":"MDU6TGFiZWwyMTEwMjk1MzU=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Clean","name":"Clean","color":"207de5","default":false},{"id":195647930,"node_id":"MDU6TGFiZWwxOTU2NDc5MzA=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Difficulty%20Advanced","name":"Difficulty Advanced","color":"fbca04","default":false},{"id":195648009,"node_id":"MDU6TGFiZWwxOTU2NDgwMDk=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Effort%20Low","name":"Effort Low","color":"006b75","default":false},{"id":57522093,"node_id":"MDU6TGFiZWw1NzUyMjA5Mw==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Strings","name":"Strings","color":"5319e7","default":false}],"state":"open","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":83,"closed_issues":122,"state":"open","created_at":"2018-03-29T12:00:12Z","updated_at":"2018-06-27T11:23:33Z","due_on":"2018-08-31T07:00:00Z","closed_at":null},"comments":0,"created_at":"2018-06-27T10:30:33Z","updated_at":"2018-06-27T11:41:51Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The string detection routines are a bit odd, they work with arrays & not list-likes. We should change the impl to ``infer_dtype`` which already does the correct things.\r\n\r\n```\r\n[5]: from pandas.core.dtypes.common import is_string_like_dtype, is_string_dtype\r\n\r\nIn [2]: is_string_like_dtype(np.array([b'foo']))                  \r\nOut[2]: True\r\n\r\n# should work\r\nIn [3]: is_string_like_dtype([b'foo'])          \r\nOut[3]: False\r\n\r\n# should work\r\nIn [4]: is_string_like_dtype(np.array(['foo', 'bar'], dtype=object))\r\nOut[4]: False\r\n\r\nIn [6]: is_string_dtype(np.array(['foo', 'bar'], dtype=object))                    \r\nOut[6]: True\r\n\r\n# should work\r\nIn [7]: is_string_dtype(['foo', 'bar'])                        \r\nOut[7]: False\r\n```\r\nWe should also consolidate these into a single ``is_string_dtype`` if possible (this might be tricky though).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/400642486","html_url":"https://github.com/pandas-dev/pandas/issues/21653#issuecomment-400642486","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21653","id":400642486,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDY0MjQ4Ng==","user":{"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},"created_at":"2018-06-27T11:41:51Z","updated_at":"2018-06-27T11:41:51Z","author_association":"MEMBER","body":"I don't think `is_string_like_dtype` needs to change, because it is exactly meant to only check for actual numpy string types (although the name could be better). \r\n\r\nI agree in principle on `is_string_dtype`, but I am not sure it is that easy to do. I mean that this would need a check of each current usage in the codebase to see whether it actually needs strings or if it actually meant to check for general object dtype.\r\n\r\nIt might be easier (short term) to rename the current one and add a new one that is stricter and that we can start using where we know we really want strings."}}
{"actor":{"display_login":"jorisvandenbossche"}}