{"action":"created","issue":{"url":"https://api.github.com/repos/dask/dask/issues/3251","repository_url":"https://api.github.com/repos/dask/dask","labels_url":"https://api.github.com/repos/dask/dask/issues/3251/labels{/name}","comments_url":"https://api.github.com/repos/dask/dask/issues/3251/comments","events_url":"https://api.github.com/repos/dask/dask/issues/3251/events","html_url":"https://github.com/dask/dask/issues/3251","id":302849632,"number":3251,"title":"`df.values` has unspecified length","user":{"login":"stefanv","id":45071,"avatar_url":"https://avatars2.githubusercontent.com/u/45071?v=4","gravatar_id":"","url":"https://api.github.com/users/stefanv","html_url":"https://github.com/stefanv","followers_url":"https://api.github.com/users/stefanv/followers","following_url":"https://api.github.com/users/stefanv/following{/other_user}","gists_url":"https://api.github.com/users/stefanv/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanv/subscriptions","organizations_url":"https://api.github.com/users/stefanv/orgs","repos_url":"https://api.github.com/users/stefanv/repos","events_url":"https://api.github.com/users/stefanv/events{/privacy}","received_events_url":"https://api.github.com/users/stefanv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-06T20:15:58Z","updated_at":"2018-03-11T16:05:10Z","closed_at":"2018-03-06T20:50:01Z","author_association":"NONE","body":"After constructing an array of values from a dask DataFrame, the length is unspecified.\r\n\r\n```\r\nimport pandas as pd\r\nimport dask.dataframe as dd\r\n\r\ndf = pd.DataFrame.from_dict({'A': [1, 2, 3], 'B': [4, 5, 6]})\r\ndf = dd.from_pandas(df, npartitions=2)\r\n\r\nprint(df.values.shape)\r\n```\r\n\r\nProduces:\r\n\r\n```\r\n(nan, 2)\r\n```"},"comment":{"url":"https://api.github.com/repos/dask/dask/issues/comments/372126477","html_url":"https://github.com/dask/dask/issues/3251#issuecomment-372126477","issue_url":"https://api.github.com/repos/dask/dask/issues/3251","id":372126477,"user":{"login":"stsievert","id":1320475,"avatar_url":"https://avatars1.githubusercontent.com/u/1320475?v=4","gravatar_id":"","url":"https://api.github.com/users/stsievert","html_url":"https://github.com/stsievert","followers_url":"https://api.github.com/users/stsievert/followers","following_url":"https://api.github.com/users/stsievert/following{/other_user}","gists_url":"https://api.github.com/users/stsievert/gists{/gist_id}","starred_url":"https://api.github.com/users/stsievert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stsievert/subscriptions","organizations_url":"https://api.github.com/users/stsievert/orgs","repos_url":"https://api.github.com/users/stsievert/repos","events_url":"https://api.github.com/users/stsievert/events{/privacy}","received_events_url":"https://api.github.com/users/stsievert/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T16:05:10Z","updated_at":"2018-03-11T16:05:10Z","author_association":"NONE","body":"> using `len(df)`.\r\n\r\nThanks for the tip. I think that should be sufficient – I only need a random row from the dataframe values.\r\n\r\nBut, I suppose `DataFrame.values.sample` and `Array.sample` would resolve this problem. I can put in a PR for this."}}
{"actor":{"display_login":"stsievert"}}