{"action":"created","comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments/235007567","pull_request_review_id":176772179,"id":235007567,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTAwNzU2Nw==","diff_hunk":"@@ -206,7 +206,11 @@ def __init__(self, data=None, index=None, dtype=None, name=None,\n                     data = data.astype(dtype)\n                 else:\n                     # need to copy to avoid aliasing issues\n-                    data = data._values.copy()","path":"pandas/core/series.py","position":5,"original_position":4,"commit_id":"aba2368cb71f8f2b95012cbe48c55d6eeaab9f66","original_commit_id":"1856deadf8805b755b0c4bd6c75fb2f771a3d8e0","user":{"login":"makbigc","id":14367887,"node_id":"MDQ6VXNlcjE0MzY3ODg3","avatar_url":"https://avatars3.githubusercontent.com/u/14367887?v=4","gravatar_id":"","url":"https://api.github.com/users/makbigc","html_url":"https://github.com/makbigc","followers_url":"https://api.github.com/users/makbigc/followers","following_url":"https://api.github.com/users/makbigc/following{/other_user}","gists_url":"https://api.github.com/users/makbigc/gists{/gist_id}","starred_url":"https://api.github.com/users/makbigc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makbigc/subscriptions","organizations_url":"https://api.github.com/users/makbigc/orgs","repos_url":"https://api.github.com/users/makbigc/repos","events_url":"https://api.github.com/users/makbigc/events{/privacy}","received_events_url":"https://api.github.com/users/makbigc/received_events","type":"User","site_admin":false},"body":"This bug is caused by the return value of _values. In datetimes.py, _values returns the DatetimeIndex itself for tz-aware and ndarray for tz-naive.\r\n```\r\n    @property\r\n    def _values(self):\r\n        # tz-naive -> ndarray\r\n        # tz-aware -> DatetimeIndex\r\n        if self.tz is not None:\r\n            return self\r\n        else:\r\n            return self.values\r\n\r\n```\r\nThat 's why  this problem only occurs with tz-aware cases as jbrockmendel said.\r\n```\r\n\r\nIn [2]: dti1 = pd.date_range('2016-01-01', periods=10, tz='US/Pacific')\r\n\r\nIn [3]: dti2 = pd.date_range('2016-01-01', periods=10)\r\n\r\nIn [4]: ser1 = pd.Series(dti1)\r\n\r\nIn [5]: ser2 = pd.Series(dti2)\r\n\r\nIn [6]: ser1[::3]=pd.NaT\r\n\r\nIn [7]: ser2[::3]=pd.NaT\r\n\r\nIn [8]: dti1\r\nOut[8]: \r\nDatetimeIndex([                      'NaT', '2016-01-02 00:00:00-08:00',\r\n               '2016-01-03 00:00:00-08:00',                       'NaT',\r\n               '2016-01-05 00:00:00-08:00', '2016-01-06 00:00:00-08:00',\r\n                                     'NaT', '2016-01-08 00:00:00-08:00',\r\n               '2016-01-09 00:00:00-08:00',                       'NaT'],\r\n              dtype='datetime64[ns, US/Pacific]', freq='D')\r\n\r\nIn [9]: dti2\r\nOut[9]: \r\nDatetimeIndex(['2016-01-01', '2016-01-02', '2016-01-03', '2016-01-04',\r\n               '2016-01-05', '2016-01-06', '2016-01-07', '2016-01-08',\r\n               '2016-01-09', '2016-01-10'],\r\n              dtype='datetime64[ns]', freq='D')\r\n\r\n```\r\n","created_at":"2018-11-20T13:47:54Z","updated_at":"2018-11-20T13:47:54Z","html_url":"https://github.com/pandas-dev/pandas/pull/22113#discussion_r235007567","pull_request_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments/235007567"},"html":{"href":"https://github.com/pandas-dev/pandas/pull/22113#discussion_r235007567"},"pull_request":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113"}},"in_reply_to_id":205978484},"pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113","id":204648040,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjQ4MDQw","html_url":"https://github.com/pandas-dev/pandas/pull/22113","diff_url":"https://github.com/pandas-dev/pandas/pull/22113.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/22113.patch","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/22113","number":22113,"state":"open","locked":false,"title":"BUG: Series construction sharing data with DTI","user":{"login":"makbigc","id":14367887,"node_id":"MDQ6VXNlcjE0MzY3ODg3","avatar_url":"https://avatars3.githubusercontent.com/u/14367887?v=4","gravatar_id":"","url":"https://api.github.com/users/makbigc","html_url":"https://github.com/makbigc","followers_url":"https://api.github.com/users/makbigc/followers","following_url":"https://api.github.com/users/makbigc/following{/other_user}","gists_url":"https://api.github.com/users/makbigc/gists{/gist_id}","starred_url":"https://api.github.com/users/makbigc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makbigc/subscriptions","organizations_url":"https://api.github.com/users/makbigc/orgs","repos_url":"https://api.github.com/users/makbigc/repos","events_url":"https://api.github.com/users/makbigc/events{/privacy}","received_events_url":"https://api.github.com/users/makbigc/received_events","type":"User","site_admin":false},"body":"add a type check for DatetimeIndex and then pass a deep copy to create a Series object\r\n\r\n\r\ncloses #21907 ","created_at":"2018-07-29T15:40:59Z","updated_at":"2018-11-20T13:47:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c88da345be4d1899e65c357461a261edc792071","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":76811,"node_id":"MDU6TGFiZWw3NjgxMQ==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Bug","name":"Bug","color":"e10c02","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113/commits","review_comments_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113/comments","review_comment_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/22113/comments","statuses_url":"https://api.github.com/repos/pandas-dev/pandas/statuses/aba2368cb71f8f2b95012cbe48c55d6eeaab9f66","head":{"label":"makbigc:bug-fix-GH21907","ref":"bug-fix-GH21907","sha":"aba2368cb71f8f2b95012cbe48c55d6eeaab9f66","user":{"login":"makbigc","id":14367887,"node_id":"MDQ6VXNlcjE0MzY3ODg3","avatar_url":"https://avatars3.githubusercontent.com/u/14367887?v=4","gravatar_id":"","url":"https://api.github.com/users/makbigc","html_url":"https://github.com/makbigc","followers_url":"https://api.github.com/users/makbigc/followers","following_url":"https://api.github.com/users/makbigc/following{/other_user}","gists_url":"https://api.github.com/users/makbigc/gists{/gist_id}","starred_url":"https://api.github.com/users/makbigc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makbigc/subscriptions","organizations_url":"https://api.github.com/users/makbigc/orgs","repos_url":"https://api.github.com/users/makbigc/repos","events_url":"https://api.github.com/users/makbigc/events{/privacy}","received_events_url":"https://api.github.com/users/makbigc/received_events","type":"User","site_admin":false},"repo":{"id":141034721,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEwMzQ3MjE=","name":"pandas","full_name":"makbigc/pandas","private":false,"owner":{"login":"makbigc","id":14367887,"node_id":"MDQ6VXNlcjE0MzY3ODg3","avatar_url":"https://avatars3.githubusercontent.com/u/14367887?v=4","gravatar_id":"","url":"https://api.github.com/users/makbigc","html_url":"https://github.com/makbigc","followers_url":"https://api.github.com/users/makbigc/followers","following_url":"https://api.github.com/users/makbigc/following{/other_user}","gists_url":"https://api.github.com/users/makbigc/gists{/gist_id}","starred_url":"https://api.github.com/users/makbigc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makbigc/subscriptions","organizations_url":"https://api.github.com/users/makbigc/orgs","repos_url":"https://api.github.com/users/makbigc/repos","events_url":"https://api.github.com/users/makbigc/events{/privacy}","received_events_url":"https://api.github.com/users/makbigc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/makbigc/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/makbigc/pandas","forks_url":"https://api.github.com/repos/makbigc/pandas/forks","keys_url":"https://api.github.com/repos/makbigc/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/makbigc/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/makbigc/pandas/teams","hooks_url":"https://api.github.com/repos/makbigc/pandas/hooks","issue_events_url":"https://api.github.com/repos/makbigc/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/makbigc/pandas/events","assignees_url":"https://api.github.com/repos/makbigc/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/makbigc/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/makbigc/pandas/tags","blobs_url":"https://api.github.com/repos/makbigc/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/makbigc/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/makbigc/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/makbigc/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/makbigc/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/makbigc/pandas/languages","stargazers_url":"https://api.github.com/repos/makbigc/pandas/stargazers","contributors_url":"https://api.github.com/repos/makbigc/pandas/contributors","subscribers_url":"https://api.github.com/repos/makbigc/pandas/subscribers","subscription_url":"https://api.github.com/repos/makbigc/pandas/subscription","commits_url":"https://api.github.com/repos/makbigc/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/makbigc/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/makbigc/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/makbigc/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/makbigc/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/makbigc/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/makbigc/pandas/merges","archive_url":"https://api.github.com/repos/makbigc/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/makbigc/pandas/downloads","issues_url":"https://api.github.com/repos/makbigc/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/makbigc/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/makbigc/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/makbigc/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/makbigc/pandas/labels{/name}","releases_url":"https://api.github.com/repos/makbigc/pandas/releases{/id}","deployments_url":"https://api.github.com/repos/makbigc/pandas/deployments","created_at":"2018-07-15T14:38:01Z","updated_at":"2018-10-14T05:19:39Z","pushed_at":"2018-11-19T12:41:43Z","git_url":"git://github.com/makbigc/pandas.git","ssh_url":"git@github.com:makbigc/pandas.git","clone_url":"https://github.com/makbigc/pandas.git","svn_url":"https://github.com/makbigc/pandas","homepage":"http://pandas.pydata.org","size":136349,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pandas-dev:master","ref":"master","sha":"1250500cfe18f60cfb8a4867c82d14467bbee7ad","user":{"login":"pandas-dev","id":21206976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMjA2OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/21206976?v=4","gravatar_id":"","url":"https://api.github.com/users/pandas-dev","html_url":"https://github.com/pandas-dev","followers_url":"https://api.github.com/users/pandas-dev/followers","following_url":"https://api.github.com/users/pandas-dev/following{/other_user}","gists_url":"https://api.github.com/users/pandas-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pandas-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandas-dev/subscriptions","organizations_url":"https://api.github.com/users/pandas-dev/orgs","repos_url":"https://api.github.com/users/pandas-dev/repos","events_url":"https://api.github.com/users/pandas-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pandas-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":858127,"node_id":"MDEwOlJlcG9zaXRvcnk4NTgxMjc=","name":"pandas","full_name":"pandas-dev/pandas","private":false,"owner":{"login":"pandas-dev","id":21206976,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMjA2OTc2","avatar_url":"https://avatars2.githubusercontent.com/u/21206976?v=4","gravatar_id":"","url":"https://api.github.com/users/pandas-dev","html_url":"https://github.com/pandas-dev","followers_url":"https://api.github.com/users/pandas-dev/followers","following_url":"https://api.github.com/users/pandas-dev/following{/other_user}","gists_url":"https://api.github.com/users/pandas-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pandas-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandas-dev/subscriptions","organizations_url":"https://api.github.com/users/pandas-dev/orgs","repos_url":"https://api.github.com/users/pandas-dev/repos","events_url":"https://api.github.com/users/pandas-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pandas-dev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pandas-dev/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/pandas-dev/pandas","forks_url":"https://api.github.com/repos/pandas-dev/pandas/forks","keys_url":"https://api.github.com/repos/pandas-dev/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pandas-dev/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pandas-dev/pandas/teams","hooks_url":"https://api.github.com/repos/pandas-dev/pandas/hooks","issue_events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/pandas-dev/pandas/events","assignees_url":"https://api.github.com/repos/pandas-dev/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/pandas-dev/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/pandas-dev/pandas/tags","blobs_url":"https://api.github.com/repos/pandas-dev/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pandas-dev/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pandas-dev/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/pandas-dev/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pandas-dev/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/pandas-dev/pandas/languages","stargazers_url":"https://api.github.com/repos/pandas-dev/pandas/stargazers","contributors_url":"https://api.github.com/repos/pandas-dev/pandas/contributors","subscribers_url":"https://api.github.com/repos/pandas-dev/pandas/subscribers","subscription_url":"https://api.github.com/repos/pandas-dev/pandas/subscription","commits_url":"https://api.github.com/repos/pandas-dev/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/pandas-dev/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/pandas-dev/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/pandas-dev/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pandas-dev/pandas/merges","archive_url":"https://api.github.com/repos/pandas-dev/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pandas-dev/pandas/downloads","issues_url":"https://api.github.com/repos/pandas-dev/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/pandas-dev/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/pandas-dev/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/pandas-dev/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pandas-dev/pandas/labels{/name}","releases_url":"https://api.github.com/repos/pandas-dev/pandas/releases{/id}","deployments_url":"https://api.github.com/repos/pandas-dev/pandas/deployments","created_at":"2010-08-24T01:37:33Z","updated_at":"2018-11-20T13:43:01Z","pushed_at":"2018-11-20T13:17:28Z","git_url":"git://github.com/pandas-dev/pandas.git","ssh_url":"git@github.com:pandas-dev/pandas.git","clone_url":"https://github.com/pandas-dev/pandas.git","svn_url":"https://github.com/pandas-dev/pandas","homepage":"https://pandas.pydata.org","size":136851,"stargazers_count":16944,"watchers_count":16944,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6851,"mirror_url":null,"archived":false,"open_issues_count":2870,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":6851,"open_issues":2870,"watchers":16944,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113"},"html":{"href":"https://github.com/pandas-dev/pandas/pull/22113"},"issue":{"href":"https://api.github.com/repos/pandas-dev/pandas/issues/22113"},"comments":{"href":"https://api.github.com/repos/pandas-dev/pandas/issues/22113/comments"},"review_comments":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113/comments"},"review_comment":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/22113/commits"},"statuses":{"href":"https://api.github.com/repos/pandas-dev/pandas/statuses/aba2368cb71f8f2b95012cbe48c55d6eeaab9f66"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"makbigc"}}