{"id":1586,"date":"2021-08-17T15:31:42","date_gmt":"2021-08-17T06:31:42","guid":{"rendered":"https:\/\/www.kwonline.org\/memo2\/?p=1586"},"modified":"2021-08-17T15:31:42","modified_gmt":"2021-08-17T06:31:42","slug":"generate-arbitrary-data-python-faker","status":"publish","type":"post","link":"https:\/\/www.kwonline.org\/memo2\/2021\/08\/17\/generate-arbitrary-data-python-faker\/","title":{"rendered":"Faker \u3067\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3059\u308b"},"content":{"rendered":"<p>&nbsp;<br \/>\n\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u751f\u6210\u306b\u4f7f\u3063\u305f\u3089\u4fbf\u5229\u3060\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<p><a href=\"https:\/\/faker.readthedocs.io\/en\/master\/\" rel=\"noopener\" target=\"_blank\">Welcome to Faker\u2019s documentation<\/a><\/p>\n<p>\u307e\u305a\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\npip install Faker\r\n<\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u4f7f\u3048\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ faker address\r\n494 Jones Rapids Suite 965\r\n<\/pre>\n<p>\u65e5\u672c\u8a9e\u30c7\u30fc\u30bf\u304c\u6b32\u3057\u3044\u5834\u5408<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ faker -l ja_JP address\r\n\u9e7f\u5150\u5cf6\u770c\u5937\u9685\u90e1\u5fa1\u5bbf\u753a\u5916\u795e\u753041\u4e01\u76ee6\u756a1\u53f7 \u30d1\u30ec\u30b9\u5143\u6d45\u8349281\r\n<\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5165\u308c\u3066\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306b\u306f\u3082\u3063\u3068\u8272\u3093\u306a\u30c7\u30fc\u30bf\u304c\u6b32\u3057\u3044\u306e\u3067 python \u3067\u5b9f\u88c5\u3059\u308b\u4e8b\u306b\u306a\u308b\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nfrom faker import Faker\r\nfake = Faker('ja_JP')\r\nfor _ in range(10):\r\n    first_name = fake.first_name()\r\n    last_name = fake.last_name()\r\n    address = fake.address()\r\n    postcode = fake.postcode()\r\n    company = fake.company()\r\n    phone_number = fake.phone_number()\r\n\r\n    row = &#x5B;first_name, last_name, address, postcode, phone_number, company]\r\n    print(&quot;,&quot;.join(row))\r\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ python fakedemo.py\r\n\u7be4\u53f8,\u5c71\u7530,\u9ce5\u53d6\u770c\u5370\u897f\u5e02\u897f\u795e\u753036\u4e01\u76ee10\u756a10\u53f7,701-0841,080-8985-2499,\u6e21\u8fba\u96fb\u6c17\u6709\u9650\u4f1a\u793e\r\n\u5eb7\u5f18,\u5c71\u7530,\u798f\u5ca1\u770c\u5bcc\u91cc\u5e02\u5927\u4eac\u753a33\u4e01\u76ee3\u756a7\u53f7,648-9587,090-1581-3156,\u5408\u540c\u4f1a\u793e\u4f0a\u85e4\u9280\u884c\r\n\u6d69,\u4f50\u85e4,\u5c90\u961c\u770c\u6587\u4eac\u533a\u864e\u30ce\u958022\u4e01\u76ee12\u756a8\u53f7,333-5026,080-6916-6228,\u85e4\u4e95\u60c5\u5831\u5408\u540c\u4f1a\u793e\r\n\u6dbc\u5e73,\u658e\u85e4,\u9ad8\u77e5\u770c\u8db3\u7acb\u533a\u864e\u30ce\u9580\u864e\u30ce\u9580\u30d2\u30eb\u30ba\u68ee\u30bf\u30ef\u30fc2\u4e01\u76ee13\u756a11\u53f7 \u897f\u5ddd\u30b7\u30c6\u30a3402,833-6299,090-0662-3401,\u5c71\u672c\u901a\u4fe1\u682a\u5f0f\u4f1a\u793e\r\n\u821e,\u85e4\u7530,\u65b0\u6f5f\u770c\u753a\u7530\u5e02\u7bad\u576a8\u4e01\u76ee15\u756a8\u53f7 \u30a2\u30fc\u30d0\u30f3\u9ce5\u8d8a213,064-7697,080-7680-9976,\u5408\u540c\u4f1a\u793e\u85e4\u4e95\u5370\u5237\r\n\u8061\u592a\u90ce,\u5c71\u672c,\u4f50\u8cc0\u770c\u9577\u751f\u90e1\u9577\u751f\u6751\u85e4\u91d115\u4e01\u76ee18\u756a14\u53f7,163-9754,080-9500-1382,\u85e4\u7530\u901a\u4fe1\u5408\u540c\u4f1a\u793e\r\n\u548c\u4e5f,\u798f\u7530,\u9e7f\u5150\u5cf6\u770c\u6a2a\u6d5c\u5e02\u91d1\u6ca2\u533a\u5343\u585a21\u4e01\u76ee12\u756a16\u53f7 \u30a2\u30fc\u30d0\u30f3\u7b51\u571f\u516b\u5e61\u753a525,841-9381,090-9472-8325,\u682a\u5f0f\u4f1a\u793e\u4f50\u85e4\u60c5\u5831\r\n\u6643,\u6e21\u8fba,\u5c71\u5f62\u770c\u9577\u751f\u90e1\u9577\u5357\u753a\u677e\u304c\u8c3741\u4e01\u76ee1\u756a4\u53f7 \u30cf\u30a4\u30c4\u5e78\u624b575,073-9308,080-2462-1557,\u6728\u6751\u901a\u4fe1\u6709\u9650\u4f1a\u793e\r\n\u6643,\u77f3\u5ddd,\u798f\u5cf6\u770c\u7a32\u57ce\u5e02\u5e73\u6cb3\u753a30\u4e01\u76ee6\u756a10\u53f7 \u4eac\u6a4b\u30b7\u30c6\u30a3826,755-7151,070-0792-2768,\u5ca1\u672c\u5370\u5237\u6709\u9650\u4f1a\u793e\r\n\u82b1\u5b50,\u4e09\u6d66,\u5c71\u68a8\u770c\u6211\u5b6b\u5b50\u5e02\u6771\u548c\u753a31\u4e01\u76ee14\u756a6\u53f7 \u6d25\u4e45\u6238\u753a\u30af\u30ec\u30b9\u30c8794,346-9401,070-4662-9803,\u682a\u5f0f\u4f1a\u793e\u4f50\u85e4\u96fb\u6c17\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u751f\u6210\u306b\u4f7f\u3063\u305f\u3089\u4fbf\u5229\u3060\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 Welcome to Faker\u2019s documentation \u307e\u305a\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb pip install Faker \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u4f7f\u3048\u308b $ fake [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-1586","post","type-post","status-publish","format-standard","hentry","category-data-engineering"],"_links":{"self":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/1586","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/comments?post=1586"}],"version-history":[{"count":2,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/1586\/revisions"}],"predecessor-version":[{"id":1588,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/posts\/1586\/revisions\/1588"}],"wp:attachment":[{"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/media?parent=1586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/categories?post=1586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kwonline.org\/memo2\/wp-json\/wp\/v2\/tags?post=1586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}