{"action":"created","comment":{"url":"https://api.github.com/repos/blaze/dask/pulls/comments/39707710","id":39707710,"diff_hunk":"@@ -46,6 +46,47 @@ def test_read_csv():\n         result = f.compute(get=dask.get).sort('name')\n         assert (result.values == pd.read_csv(fn).sort('name').values).all()\n \n+timeseries = \"\"\"\n+Date,Open,High,Low,Close,Volume,Adj Close\n+2015-08-28,198.50,199.839996,197.919998,199.240005,143298900,199.240005\n+2015-08-27,197.020004,199.419998,195.210007,199.160004,266244700,199.160004\n+2015-08-26,192.080002,194.789993,188.369995,194.679993,328058100,194.679993\n+2015-08-25,195.429993,195.449997,186.919998,187.229996,353966700,187.229996\n+2015-08-24,197.630005,197.630005,182.399994,189.550003,478672400,189.550003\n+2015-08-21,201.729996,203.940002,197.520004,197.630005,328271500,197.630005\n+2015-08-20,206.509995,208.289993,203.899994,204.009995,185865600,204.009995\n+2015-08-19,209.089996,210.009995,207.350006,208.279999,167316300,208.279999\n+2015-08-18,210.259995,210.679993,209.699997,209.929993,70043800,209.929993\n+\"\"\".strip()\n+\n+def test_read_csv_with_datetime_index_partitions_one():\n+    with filetext(timeseries) as fn:\n+        df = pd.read_csv(fn, index_col=0, header=0, usecols=[0, 4], parse_dates=['Date'])\n+        # nrows set to explicitly set to single chunk\n+        ddf = dd.read_csv(fn, index='Date', header=0, usecols=[0, 4], parse_dates=['Date'],  nrows=1000)\n+        np.all(df == ddf.compute())\n+        # because fn is so small, by default, this will only be one chunk\n+        ddf = dd.read_csv(fn, index='Date', header=0, usecols=[0, 4], parse_dates=['Date'])\n+        np.all(df == ddf.compute())\n+\n+def test_read_csv_with_datetime_index_partitions_n():\n+    with filetext(timeseries) as fn:\n+        df = pd.read_csv(fn, index_col=0, header=0, usecols=[0, 4], parse_dates=['Date'])\n+        # because fn is so small, by default, set chunksize small\n+        ddf = dd.read_csv(fn, index='Date', header=0, usecols=[0, 4], parse_dates=['Date'], chunkbytes=400)\n+        print(df)\n+        print(ddf.compute())\n+        np.all(df == ddf.compute())\n+\n+def test_from_pandas_with_datetime_index():\n+    with filetext(timeseries) as fn:\n+        df = pd.read_csv(fn, index_col=0, header=0, usecols=[0, 4], parse_dates=['Date'])\n+        ddf = dd.from_pandas(df, 2)\n+        assert(df.index.dtype == ddf.index.compute().dtype)","path":"dask/dataframe/tests/test_io.py","position":40,"original_position":40,"commit_id":"0c70cc76acec913209f93cf0c961eb70b9a40ab6","original_commit_id":"0c70cc76acec913209f93cf0c961eb70b9a40ab6","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"body":"The dtype checks will happen in the `eq` function if you use it.  Actually, these use `pandas.utils.testing.assert_frame_equal` which checks *lots* of things.","created_at":"2015-09-17T02:50:28Z","updated_at":"2015-09-17T02:50:28Z","html_url":"https://github.com/blaze/dask/pull/720#discussion_r39707710","pull_request_url":"https://api.github.com/repos/blaze/dask/pulls/720","_links":{"self":{"href":"https://api.github.com/repos/blaze/dask/pulls/comments/39707710"},"html":{"href":"https://github.com/blaze/dask/pull/720#discussion_r39707710"},"pull_request":{"href":"https://api.github.com/repos/blaze/dask/pulls/720"}}},"pull_request":{"url":"https://api.github.com/repos/blaze/dask/pulls/720","id":45242907,"html_url":"https://github.com/blaze/dask/pull/720","diff_url":"https://github.com/blaze/dask/pull/720.diff","patch_url":"https://github.com/blaze/dask/pull/720.patch","issue_url":"https://api.github.com/repos/blaze/dask/issues/720","number":720,"state":"open","locked":false,"title":"Updates to read_csv for DateTimeIndex, and new tests","user":{"login":"caseyclements","id":737181,"avatar_url":"https://avatars.githubusercontent.com/u/737181?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyclements","html_url":"https://github.com/caseyclements","followers_url":"https://api.github.com/users/caseyclements/followers","following_url":"https://api.github.com/users/caseyclements/following{/other_user}","gists_url":"https://api.github.com/users/caseyclements/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyclements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyclements/subscriptions","organizations_url":"https://api.github.com/users/caseyclements/orgs","repos_url":"https://api.github.com/users/caseyclements/repos","events_url":"https://api.github.com/users/caseyclements/events{/privacy}","received_events_url":"https://api.github.com/users/caseyclements/received_events","type":"User","site_admin":false},"body":"Small changes while playing with our 'wide' financial use case.","created_at":"2015-09-17T01:23:29Z","updated_at":"2015-09-17T02:50:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4558962c96a9907be587d6a14bd1edc6b5551ae0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/blaze/dask/pulls/720/commits","review_comments_url":"https://api.github.com/repos/blaze/dask/pulls/720/comments","review_comment_url":"https://api.github.com/repos/blaze/dask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blaze/dask/issues/720/comments","statuses_url":"https://api.github.com/repos/blaze/dask/statuses/0c70cc76acec913209f93cf0c961eb70b9a40ab6","head":{"label":"caseyclements:master","ref":"master","sha":"0c70cc76acec913209f93cf0c961eb70b9a40ab6","user":{"login":"caseyclements","id":737181,"avatar_url":"https://avatars.githubusercontent.com/u/737181?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyclements","html_url":"https://github.com/caseyclements","followers_url":"https://api.github.com/users/caseyclements/followers","following_url":"https://api.github.com/users/caseyclements/following{/other_user}","gists_url":"https://api.github.com/users/caseyclements/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyclements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyclements/subscriptions","organizations_url":"https://api.github.com/users/caseyclements/orgs","repos_url":"https://api.github.com/users/caseyclements/repos","events_url":"https://api.github.com/users/caseyclements/events{/privacy}","received_events_url":"https://api.github.com/users/caseyclements/received_events","type":"User","site_admin":false},"repo":{"id":42515475,"name":"dask","full_name":"caseyclements/dask","owner":{"login":"caseyclements","id":737181,"avatar_url":"https://avatars.githubusercontent.com/u/737181?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyclements","html_url":"https://github.com/caseyclements","followers_url":"https://api.github.com/users/caseyclements/followers","following_url":"https://api.github.com/users/caseyclements/following{/other_user}","gists_url":"https://api.github.com/users/caseyclements/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyclements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyclements/subscriptions","organizations_url":"https://api.github.com/users/caseyclements/orgs","repos_url":"https://api.github.com/users/caseyclements/repos","events_url":"https://api.github.com/users/caseyclements/events{/privacy}","received_events_url":"https://api.github.com/users/caseyclements/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caseyclements/dask","description":"Task scheduling and blocked algorithms for parallel processing","fork":true,"url":"https://api.github.com/repos/caseyclements/dask","forks_url":"https://api.github.com/repos/caseyclements/dask/forks","keys_url":"https://api.github.com/repos/caseyclements/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caseyclements/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caseyclements/dask/teams","hooks_url":"https://api.github.com/repos/caseyclements/dask/hooks","issue_events_url":"https://api.github.com/repos/caseyclements/dask/issues/events{/number}","events_url":"https://api.github.com/repos/caseyclements/dask/events","assignees_url":"https://api.github.com/repos/caseyclements/dask/assignees{/user}","branches_url":"https://api.github.com/repos/caseyclements/dask/branches{/branch}","tags_url":"https://api.github.com/repos/caseyclements/dask/tags","blobs_url":"https://api.github.com/repos/caseyclements/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caseyclements/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caseyclements/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/caseyclements/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caseyclements/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/caseyclements/dask/languages","stargazers_url":"https://api.github.com/repos/caseyclements/dask/stargazers","contributors_url":"https://api.github.com/repos/caseyclements/dask/contributors","subscribers_url":"https://api.github.com/repos/caseyclements/dask/subscribers","subscription_url":"https://api.github.com/repos/caseyclements/dask/subscription","commits_url":"https://api.github.com/repos/caseyclements/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/caseyclements/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/caseyclements/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/caseyclements/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/caseyclements/dask/contents/{+path}","compare_url":"https://api.github.com/repos/caseyclements/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caseyclements/dask/merges","archive_url":"https://api.github.com/repos/caseyclements/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caseyclements/dask/downloads","issues_url":"https://api.github.com/repos/caseyclements/dask/issues{/number}","pulls_url":"https://api.github.com/repos/caseyclements/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/caseyclements/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/caseyclements/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caseyclements/dask/labels{/name}","releases_url":"https://api.github.com/repos/caseyclements/dask/releases{/id}","created_at":"2015-09-15T11:35:07Z","updated_at":"2015-09-15T11:35:08Z","pushed_at":"2015-09-17T01:15:34Z","git_url":"git://github.com/caseyclements/dask.git","ssh_url":"git@github.com:caseyclements/dask.git","clone_url":"https://github.com/caseyclements/dask.git","svn_url":"https://github.com/caseyclements/dask","homepage":"http://dask.pydata.org","size":8291,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"blaze:master","ref":"master","sha":"e767fc6fef5ac2d0b0612e1bcd4d7dddf59412c6","user":{"login":"blaze","id":12833921,"avatar_url":"https://avatars.githubusercontent.com/u/12833921?v=3","gravatar_id":"","url":"https://api.github.com/users/blaze","html_url":"https://github.com/blaze","followers_url":"https://api.github.com/users/blaze/followers","following_url":"https://api.github.com/users/blaze/following{/other_user}","gists_url":"https://api.github.com/users/blaze/gists{/gist_id}","starred_url":"https://api.github.com/users/blaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blaze/subscriptions","organizations_url":"https://api.github.com/users/blaze/orgs","repos_url":"https://api.github.com/users/blaze/repos","events_url":"https://api.github.com/users/blaze/events{/privacy}","received_events_url":"https://api.github.com/users/blaze/received_events","type":"Organization","site_admin":false},"repo":{"id":28782747,"name":"dask","full_name":"blaze/dask","owner":{"login":"blaze","id":12833921,"avatar_url":"https://avatars.githubusercontent.com/u/12833921?v=3","gravatar_id":"","url":"https://api.github.com/users/blaze","html_url":"https://github.com/blaze","followers_url":"https://api.github.com/users/blaze/followers","following_url":"https://api.github.com/users/blaze/following{/other_user}","gists_url":"https://api.github.com/users/blaze/gists{/gist_id}","starred_url":"https://api.github.com/users/blaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blaze/subscriptions","organizations_url":"https://api.github.com/users/blaze/orgs","repos_url":"https://api.github.com/users/blaze/repos","events_url":"https://api.github.com/users/blaze/events{/privacy}","received_events_url":"https://api.github.com/users/blaze/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blaze/dask","description":"Task scheduling and blocked algorithms for parallel processing","fork":false,"url":"https://api.github.com/repos/blaze/dask","forks_url":"https://api.github.com/repos/blaze/dask/forks","keys_url":"https://api.github.com/repos/blaze/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blaze/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blaze/dask/teams","hooks_url":"https://api.github.com/repos/blaze/dask/hooks","issue_events_url":"https://api.github.com/repos/blaze/dask/issues/events{/number}","events_url":"https://api.github.com/repos/blaze/dask/events","assignees_url":"https://api.github.com/repos/blaze/dask/assignees{/user}","branches_url":"https://api.github.com/repos/blaze/dask/branches{/branch}","tags_url":"https://api.github.com/repos/blaze/dask/tags","blobs_url":"https://api.github.com/repos/blaze/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blaze/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blaze/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/blaze/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blaze/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/blaze/dask/languages","stargazers_url":"https://api.github.com/repos/blaze/dask/stargazers","contributors_url":"https://api.github.com/repos/blaze/dask/contributors","subscribers_url":"https://api.github.com/repos/blaze/dask/subscribers","subscription_url":"https://api.github.com/repos/blaze/dask/subscription","commits_url":"https://api.github.com/repos/blaze/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/blaze/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/blaze/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/blaze/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/blaze/dask/contents/{+path}","compare_url":"https://api.github.com/repos/blaze/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blaze/dask/merges","archive_url":"https://api.github.com/repos/blaze/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blaze/dask/downloads","issues_url":"https://api.github.com/repos/blaze/dask/issues{/number}","pulls_url":"https://api.github.com/repos/blaze/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/blaze/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/blaze/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blaze/dask/labels{/name}","releases_url":"https://api.github.com/repos/blaze/dask/releases{/id}","created_at":"2015-01-04T18:50:00Z","updated_at":"2015-09-16T20:18:33Z","pushed_at":"2015-09-17T01:23:29Z","git_url":"git://github.com/blaze/dask.git","ssh_url":"git@github.com:blaze/dask.git","clone_url":"https://github.com/blaze/dask.git","svn_url":"https://github.com/blaze/dask","homepage":"http://dask.pydata.org","size":12809,"stargazers_count":329,"watchers_count":329,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":78,"forks":58,"open_issues":78,"watchers":329,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blaze/dask/pulls/720"},"html":{"href":"https://github.com/blaze/dask/pull/720"},"issue":{"href":"https://api.github.com/repos/blaze/dask/issues/720"},"comments":{"href":"https://api.github.com/repos/blaze/dask/issues/720/comments"},"review_comments":{"href":"https://api.github.com/repos/blaze/dask/pulls/720/comments"},"review_comment":{"href":"https://api.github.com/repos/blaze/dask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blaze/dask/pulls/720/commits"},"statuses":{"href":"https://api.github.com/repos/blaze/dask/statuses/0c70cc76acec913209f93cf0c961eb70b9a40ab6"}}}}