{"action":"created","comment":{"url":"https://api.github.com/repos/pydata/pandas/pulls/comments/37178088","id":37178088,"diff_hunk":"@@ -1257,6 +1257,12 @@ def get_loc(self, key, method=None):\n                                           'when key is a time object')\n             return self.indexer_at_time(key)\n \n+        # check if it's a Period and the frequencies are the same - otherwise a monthly period would match for\n+        # a daily timestamp at the beginning of the month. NB: 'B' and 'D' therefore won't match\n+        if isinstance(key, com.ABCPeriod) and key.freq == self.freq:","path":"pandas/tseries/index.py","position":6,"original_position":6,"commit_id":"0412053b2af6f56fc2dd5b2fda69e9f4692048c4","original_commit_id":"0c2e9ed26ff1ee7e220b5b929b0f879edcfd47cd","user":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","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},"body":"not what I meant. I think these should work IF its a ``Period``. My question is that the freq is irrelevant if *either* the start/end date is in the ``DatetimeIndex``? So give some examples with a freq of ``None`` , but that the ``Period`` can match","created_at":"2015-08-17T11:19:13Z","updated_at":"2015-08-17T11:19:13Z","html_url":"https://github.com/pydata/pandas/pull/10801#discussion_r37178088","pull_request_url":"https://api.github.com/repos/pydata/pandas/pulls/10801","_links":{"self":{"href":"https://api.github.com/repos/pydata/pandas/pulls/comments/37178088"},"html":{"href":"https://github.com/pydata/pandas/pull/10801#discussion_r37178088"},"pull_request":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10801"}}},"pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/10801","id":42187626,"html_url":"https://github.com/pydata/pandas/pull/10801","diff_url":"https://github.com/pydata/pandas/pull/10801.diff","patch_url":"https://github.com/pydata/pandas/pull/10801.patch","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10801","number":10801,"state":"open","locked":false,"title":"PeriodIndex test keys that aren't strings","user":{"login":"maximilianr","id":5635139,"avatar_url":"https://avatars.githubusercontent.com/u/5635139?v=3","gravatar_id":"","url":"https://api.github.com/users/maximilianr","html_url":"https://github.com/maximilianr","followers_url":"https://api.github.com/users/maximilianr/followers","following_url":"https://api.github.com/users/maximilianr/following{/other_user}","gists_url":"https://api.github.com/users/maximilianr/gists{/gist_id}","starred_url":"https://api.github.com/users/maximilianr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximilianr/subscriptions","organizations_url":"https://api.github.com/users/maximilianr/orgs","repos_url":"https://api.github.com/users/maximilianr/repos","events_url":"https://api.github.com/users/maximilianr/events{/privacy}","received_events_url":"https://api.github.com/users/maximilianr/received_events","type":"User","site_admin":false},"body":"Closes https://github.com/pydata/pandas/issues/10798\r\n\r\nNot sure if the testing is done in a good way - I just copy & pasted code to test `PeriodIndex` & `DatetimeIndex` (it wouldn't work for `LikeDatetimeIndex` because of `TimeDeltaIndex`) - very open to feedback on better ways to do this.","created_at":"2015-08-11T22:50:49Z","updated_at":"2015-08-17T11:19:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61c619827911297516a67588fafa5592455b63ec","assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/34","html_url":"https://github.com/pydata/pandas/milestones/0.17.0","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/34/labels","id":1033710,"number":34,"title":"0.17.0","description":"","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","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},"open_issues":133,"closed_issues":273,"state":"open","created_at":"2015-03-23T10:47:38Z","updated_at":"2015-08-17T11:10:19Z","due_on":"2015-08-31T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/pydata/pandas/pulls/10801/commits","review_comments_url":"https://api.github.com/repos/pydata/pandas/pulls/10801/comments","review_comment_url":"https://api.github.com/repos/pydata/pandas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10801/comments","statuses_url":"https://api.github.com/repos/pydata/pandas/statuses/0412053b2af6f56fc2dd5b2fda69e9f4692048c4","head":{"label":"SixtyCapital:datetime-as-periodindex-key","ref":"datetime-as-periodindex-key","sha":"0412053b2af6f56fc2dd5b2fda69e9f4692048c4","user":{"login":"SixtyCapital","id":8664884,"avatar_url":"https://avatars.githubusercontent.com/u/8664884?v=3","gravatar_id":"","url":"https://api.github.com/users/SixtyCapital","html_url":"https://github.com/SixtyCapital","followers_url":"https://api.github.com/users/SixtyCapital/followers","following_url":"https://api.github.com/users/SixtyCapital/following{/other_user}","gists_url":"https://api.github.com/users/SixtyCapital/gists{/gist_id}","starred_url":"https://api.github.com/users/SixtyCapital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SixtyCapital/subscriptions","organizations_url":"https://api.github.com/users/SixtyCapital/orgs","repos_url":"https://api.github.com/users/SixtyCapital/repos","events_url":"https://api.github.com/users/SixtyCapital/events{/privacy}","received_events_url":"https://api.github.com/users/SixtyCapital/received_events","type":"Organization","site_admin":false},"repo":{"id":39152389,"name":"pandas","full_name":"SixtyCapital/pandas","owner":{"login":"SixtyCapital","id":8664884,"avatar_url":"https://avatars.githubusercontent.com/u/8664884?v=3","gravatar_id":"","url":"https://api.github.com/users/SixtyCapital","html_url":"https://github.com/SixtyCapital","followers_url":"https://api.github.com/users/SixtyCapital/followers","following_url":"https://api.github.com/users/SixtyCapital/following{/other_user}","gists_url":"https://api.github.com/users/SixtyCapital/gists{/gist_id}","starred_url":"https://api.github.com/users/SixtyCapital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SixtyCapital/subscriptions","organizations_url":"https://api.github.com/users/SixtyCapital/orgs","repos_url":"https://api.github.com/users/SixtyCapital/repos","events_url":"https://api.github.com/users/SixtyCapital/events{/privacy}","received_events_url":"https://api.github.com/users/SixtyCapital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SixtyCapital/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":true,"url":"https://api.github.com/repos/SixtyCapital/pandas","forks_url":"https://api.github.com/repos/SixtyCapital/pandas/forks","keys_url":"https://api.github.com/repos/SixtyCapital/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SixtyCapital/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SixtyCapital/pandas/teams","hooks_url":"https://api.github.com/repos/SixtyCapital/pandas/hooks","issue_events_url":"https://api.github.com/repos/SixtyCapital/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/SixtyCapital/pandas/events","assignees_url":"https://api.github.com/repos/SixtyCapital/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/SixtyCapital/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/SixtyCapital/pandas/tags","blobs_url":"https://api.github.com/repos/SixtyCapital/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SixtyCapital/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SixtyCapital/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/SixtyCapital/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SixtyCapital/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/SixtyCapital/pandas/languages","stargazers_url":"https://api.github.com/repos/SixtyCapital/pandas/stargazers","contributors_url":"https://api.github.com/repos/SixtyCapital/pandas/contributors","subscribers_url":"https://api.github.com/repos/SixtyCapital/pandas/subscribers","subscription_url":"https://api.github.com/repos/SixtyCapital/pandas/subscription","commits_url":"https://api.github.com/repos/SixtyCapital/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/SixtyCapital/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/SixtyCapital/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/SixtyCapital/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/SixtyCapital/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/SixtyCapital/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SixtyCapital/pandas/merges","archive_url":"https://api.github.com/repos/SixtyCapital/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SixtyCapital/pandas/downloads","issues_url":"https://api.github.com/repos/SixtyCapital/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/SixtyCapital/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/SixtyCapital/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/SixtyCapital/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SixtyCapital/pandas/labels{/name}","releases_url":"https://api.github.com/repos/SixtyCapital/pandas/releases{/id}","created_at":"2015-07-15T18:01:25Z","updated_at":"2015-07-15T18:01:29Z","pushed_at":"2015-08-16T19:12:27Z","git_url":"git://github.com/SixtyCapital/pandas.git","ssh_url":"git@github.com:SixtyCapital/pandas.git","clone_url":"https://github.com/SixtyCapital/pandas.git","svn_url":"https://github.com/SixtyCapital/pandas","homepage":"http://pandas.pydata.org","size":59132,"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":"pydata:master","ref":"master","sha":"05a8badce4a786eed17d6a4fc1287c84023024da","user":{"login":"pydata","id":1284191,"avatar_url":"https://avatars.githubusercontent.com/u/1284191?v=3","gravatar_id":"","url":"https://api.github.com/users/pydata","html_url":"https://github.com/pydata","followers_url":"https://api.github.com/users/pydata/followers","following_url":"https://api.github.com/users/pydata/following{/other_user}","gists_url":"https://api.github.com/users/pydata/gists{/gist_id}","starred_url":"https://api.github.com/users/pydata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pydata/subscriptions","organizations_url":"https://api.github.com/users/pydata/orgs","repos_url":"https://api.github.com/users/pydata/repos","events_url":"https://api.github.com/users/pydata/events{/privacy}","received_events_url":"https://api.github.com/users/pydata/received_events","type":"Organization","site_admin":false},"repo":{"id":858127,"name":"pandas","full_name":"pydata/pandas","owner":{"login":"pydata","id":1284191,"avatar_url":"https://avatars.githubusercontent.com/u/1284191?v=3","gravatar_id":"","url":"https://api.github.com/users/pydata","html_url":"https://github.com/pydata","followers_url":"https://api.github.com/users/pydata/followers","following_url":"https://api.github.com/users/pydata/following{/other_user}","gists_url":"https://api.github.com/users/pydata/gists{/gist_id}","starred_url":"https://api.github.com/users/pydata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pydata/subscriptions","organizations_url":"https://api.github.com/users/pydata/orgs","repos_url":"https://api.github.com/users/pydata/repos","events_url":"https://api.github.com/users/pydata/events{/privacy}","received_events_url":"https://api.github.com/users/pydata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pydata/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":false,"url":"https://api.github.com/repos/pydata/pandas","forks_url":"https://api.github.com/repos/pydata/pandas/forks","keys_url":"https://api.github.com/repos/pydata/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pydata/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pydata/pandas/teams","hooks_url":"https://api.github.com/repos/pydata/pandas/hooks","issue_events_url":"https://api.github.com/repos/pydata/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/pydata/pandas/events","assignees_url":"https://api.github.com/repos/pydata/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/pydata/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/pydata/pandas/tags","blobs_url":"https://api.github.com/repos/pydata/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pydata/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pydata/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/pydata/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pydata/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/pydata/pandas/languages","stargazers_url":"https://api.github.com/repos/pydata/pandas/stargazers","contributors_url":"https://api.github.com/repos/pydata/pandas/contributors","subscribers_url":"https://api.github.com/repos/pydata/pandas/subscribers","subscription_url":"https://api.github.com/repos/pydata/pandas/subscription","commits_url":"https://api.github.com/repos/pydata/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/pydata/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/pydata/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/pydata/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/pydata/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/pydata/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pydata/pandas/merges","archive_url":"https://api.github.com/repos/pydata/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pydata/pandas/downloads","issues_url":"https://api.github.com/repos/pydata/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/pydata/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/pydata/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/pydata/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pydata/pandas/labels{/name}","releases_url":"https://api.github.com/repos/pydata/pandas/releases{/id}","created_at":"2010-08-24T01:37:33Z","updated_at":"2015-08-17T11:18:41Z","pushed_at":"2015-08-17T11:18:34Z","git_url":"git://github.com/pydata/pandas.git","ssh_url":"git@github.com:pydata/pandas.git","clone_url":"https://github.com/pydata/pandas.git","svn_url":"https://github.com/pydata/pandas","homepage":"http://pandas.pydata.org","size":153605,"stargazers_count":4805,"watchers_count":4805,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1822,"mirror_url":null,"open_issues_count":1503,"forks":1822,"open_issues":1503,"watchers":4805,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10801"},"html":{"href":"https://github.com/pydata/pandas/pull/10801"},"issue":{"href":"https://api.github.com/repos/pydata/pandas/issues/10801"},"comments":{"href":"https://api.github.com/repos/pydata/pandas/issues/10801/comments"},"review_comments":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10801/comments"},"review_comment":{"href":"https://api.github.com/repos/pydata/pandas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10801/commits"},"statuses":{"href":"https://api.github.com/repos/pydata/pandas/statuses/0412053b2af6f56fc2dd5b2fda69e9f4692048c4"}}}}