{"action":"created","comment":{"url":"https://api.github.com/repos/pydata/pandas/pulls/comments/23041013","id":23041013,"diff_hunk":"@@ -1189,13 +1190,18 @@ def data(self, convert_dates=True, convert_categoricals=True, index=None,\n         dtype = []  # Convert struct data types to numpy data type\n         for i, typ in enumerate(self.typlist):\n             if typ in self.NUMPY_TYPE_MAP:\n-                dtype.append(('s' + str(i), self.NUMPY_TYPE_MAP[typ]))\n+                dtype.append(('s' + str(i), self.byteorder + self.NUMPY_TYPE_MAP[typ]))\n             else:\n                 dtype.append(('s' + str(i), 'S' + str(typ)))\n         dtype = np.dtype(dtype)\n         read_len = count * dtype.itemsize\n         self.path_or_buf.seek(self.data_location)\n         data = np.frombuffer(self.path_or_buf.read(read_len),dtype=dtype,count=count)\n+        # if necessary, swap the byte order to native here\n+        if self.byteorder != self._native_byteorder:\n+            print(data.dtype)\n+            data = data.byteswap().newbyteorder()\n+            print(data.dtype)","path":"pandas/io/stata.py","position":24,"original_position":24,"commit_id":"f074b75ffe7a94630a8d5c324451b529f78ec5e1","original_commit_id":"f074b75ffe7a94630a8d5c324451b529f78ec5e1","user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"body":"prints left from debugging or really intended for some reason?","created_at":"2015-01-15T20:28:48Z","updated_at":"2015-01-15T20:28:48Z","html_url":"https://github.com/pydata/pandas/pull/9264#discussion_r23041013","pull_request_url":"https://api.github.com/repos/pydata/pandas/pulls/9264","_links":{"self":{"href":"https://api.github.com/repos/pydata/pandas/pulls/comments/23041013"},"html":{"href":"https://github.com/pydata/pandas/pull/9264#discussion_r23041013"},"pull_request":{"href":"https://api.github.com/repos/pydata/pandas/pulls/9264"}}},"pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/9264","id":27458409,"html_url":"https://github.com/pydata/pandas/pull/9264","diff_url":"https://github.com/pydata/pandas/pull/9264.diff","patch_url":"https://github.com/pydata/pandas/pull/9264.patch","issue_url":"https://api.github.com/repos/pydata/pandas/issues/9264","number":9264,"state":"open","locked":false,"title":"FIX: Add endianness missing flag when reading data","user":{"login":"bashtage","id":5585221,"avatar_url":"https://avatars.githubusercontent.com/u/5585221?v=3","gravatar_id":"","url":"https://api.github.com/users/bashtage","html_url":"https://github.com/bashtage","followers_url":"https://api.github.com/users/bashtage/followers","following_url":"https://api.github.com/users/bashtage/following{/other_user}","gists_url":"https://api.github.com/users/bashtage/gists{/gist_id}","starred_url":"https://api.github.com/users/bashtage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bashtage/subscriptions","organizations_url":"https://api.github.com/users/bashtage/orgs","repos_url":"https://api.github.com/users/bashtage/repos","events_url":"https://api.github.com/users/bashtage/events{/privacy}","received_events_url":"https://api.github.com/users/bashtage/received_events","type":"User","site_admin":false},"body":"Added endianess flat to data type to allow data to be read cross platforms\r\n\r\ncloses #8688","created_at":"2015-01-15T20:14:19Z","updated_at":"2015-01-15T20:28:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88e2aeb3a0df4dbc8a7a90219be82044e15d2871","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pydata/pandas/pulls/9264/commits","review_comments_url":"https://api.github.com/repos/pydata/pandas/pulls/9264/comments","review_comment_url":"https://api.github.com/repos/pydata/pandas/pulls/comments/{number}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/9264/comments","statuses_url":"https://api.github.com/repos/pydata/pandas/statuses/f074b75ffe7a94630a8d5c324451b529f78ec5e1","head":{"label":"bashtage:stata-fix-bigendian","ref":"stata-fix-bigendian","sha":"f074b75ffe7a94630a8d5c324451b529f78ec5e1","user":{"login":"bashtage","id":5585221,"avatar_url":"https://avatars.githubusercontent.com/u/5585221?v=3","gravatar_id":"","url":"https://api.github.com/users/bashtage","html_url":"https://github.com/bashtage","followers_url":"https://api.github.com/users/bashtage/followers","following_url":"https://api.github.com/users/bashtage/following{/other_user}","gists_url":"https://api.github.com/users/bashtage/gists{/gist_id}","starred_url":"https://api.github.com/users/bashtage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bashtage/subscriptions","organizations_url":"https://api.github.com/users/bashtage/orgs","repos_url":"https://api.github.com/users/bashtage/repos","events_url":"https://api.github.com/users/bashtage/events{/privacy}","received_events_url":"https://api.github.com/users/bashtage/received_events","type":"User","site_admin":false},"repo":{"id":16778462,"name":"pandas","full_name":"bashtage/pandas","owner":{"login":"bashtage","id":5585221,"avatar_url":"https://avatars.githubusercontent.com/u/5585221?v=3","gravatar_id":"","url":"https://api.github.com/users/bashtage","html_url":"https://github.com/bashtage","followers_url":"https://api.github.com/users/bashtage/followers","following_url":"https://api.github.com/users/bashtage/following{/other_user}","gists_url":"https://api.github.com/users/bashtage/gists{/gist_id}","starred_url":"https://api.github.com/users/bashtage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bashtage/subscriptions","organizations_url":"https://api.github.com/users/bashtage/orgs","repos_url":"https://api.github.com/users/bashtage/repos","events_url":"https://api.github.com/users/bashtage/events{/privacy}","received_events_url":"https://api.github.com/users/bashtage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bashtage/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/bashtage/pandas","forks_url":"https://api.github.com/repos/bashtage/pandas/forks","keys_url":"https://api.github.com/repos/bashtage/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bashtage/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bashtage/pandas/teams","hooks_url":"https://api.github.com/repos/bashtage/pandas/hooks","issue_events_url":"https://api.github.com/repos/bashtage/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/bashtage/pandas/events","assignees_url":"https://api.github.com/repos/bashtage/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/bashtage/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/bashtage/pandas/tags","blobs_url":"https://api.github.com/repos/bashtage/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bashtage/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bashtage/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/bashtage/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bashtage/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/bashtage/pandas/languages","stargazers_url":"https://api.github.com/repos/bashtage/pandas/stargazers","contributors_url":"https://api.github.com/repos/bashtage/pandas/contributors","subscribers_url":"https://api.github.com/repos/bashtage/pandas/subscribers","subscription_url":"https://api.github.com/repos/bashtage/pandas/subscription","commits_url":"https://api.github.com/repos/bashtage/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/bashtage/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/bashtage/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/bashtage/pandas/issues/comments/{number}","contents_url":"https://api.github.com/repos/bashtage/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/bashtage/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bashtage/pandas/merges","archive_url":"https://api.github.com/repos/bashtage/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bashtage/pandas/downloads","issues_url":"https://api.github.com/repos/bashtage/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/bashtage/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/bashtage/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/bashtage/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bashtage/pandas/labels{/name}","releases_url":"https://api.github.com/repos/bashtage/pandas/releases{/id}","created_at":"2014-02-12T19:11:14Z","updated_at":"2014-11-22T05:05:52Z","pushed_at":"2015-01-15T20:13:58Z","git_url":"git://github.com/bashtage/pandas.git","ssh_url":"git@github.com:bashtage/pandas.git","clone_url":"https://github.com/bashtage/pandas.git","svn_url":"https://github.com/bashtage/pandas","homepage":"http://pandas.pydata.org","size":44946,"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":"bbddca45dc84408280cfb78414afeeee0d88e1a0","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-01-15T17:30:24Z","pushed_at":"2015-01-15T04:43:11Z","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":119804,"stargazers_count":3872,"watchers_count":3872,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1337,"mirror_url":null,"open_issues_count":1287,"forks":1337,"open_issues":1287,"watchers":3872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pydata/pandas/pulls/9264"},"html":{"href":"https://github.com/pydata/pandas/pull/9264"},"issue":{"href":"https://api.github.com/repos/pydata/pandas/issues/9264"},"comments":{"href":"https://api.github.com/repos/pydata/pandas/issues/9264/comments"},"review_comments":{"href":"https://api.github.com/repos/pydata/pandas/pulls/9264/comments"},"review_comment":{"href":"https://api.github.com/repos/pydata/pandas/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/pydata/pandas/pulls/9264/commits"},"statuses":{"href":"https://api.github.com/repos/pydata/pandas/statuses/f074b75ffe7a94630a8d5c324451b529f78ec5e1"}}}}