{"id":403132,"date":"2024-06-29T16:56:10","date_gmt":"2024-06-29T16:56:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=403132"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=403132","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 TabularData \u0434\u043b\u044f Dump Data Model<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u00a0<a href=\"https:\/\/developer.apple.com\/documentation\/tabulardata\" rel=\"noopener noreferrer nofollow\">TabularData\u00a0<\/a>\u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u043e\u0440\u043e\u0442\u044b, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u043e \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0439\u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043d\u0430 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0441 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u043e\u043a\u043e\u0435, \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c \u043f\u0430\u0440\u043d\u0435\u043c \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0441\u0438\u043b\u0430.  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 .csv \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 .json \u0444\u0430\u0439\u043b\u044b<\/p>\n<\/li>\n<li>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0439\u0442\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043b\u043e\u0433\u0438 \u0432 \u0441\u0432\u043e\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0433\u043e, \u043d\u043e \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0440\u044e\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, &#8212; \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0430 \u2116 4 \u0432\u044b\u0448\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0442\u0435\u0431\u044f \u0435\u0441\u0442\u044c.json, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u044d\u0442\u043e\u043c\u0443:<\/p>\n<pre><code class=\"swift\">{     \"people\":[         {             \"name\": \"David\",             \"mobile\": 33333333,             \"hasPets\": true,             \"pets\": [\"Dog\", \"Fish\", \"Bird\"],             \"address\": {                 \"permanent\": \"France\",                 \"current\": \"UK\"             }         },         {             \"name\": \"Jordan\",             \"mobile\": 33333333,             \"hasPets\": false,             \"pets\": [],             \"address\": {                 \"permanent\": \"Austrailia\",                 \"current\": \"US\"             }         }     ] }<\/code><\/pre>\n<p>\u041d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\u2026.\u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u0414\u0430\u0436\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c? \u0421\u043a\u0430\u0436\u0435\u043c, 1000 \u0438\u043b\u0438 \u043e\u043a\u043e\u043b\u043e \u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0435\u0448\u0435\u0445\u043e\u0434\u043d\u044b\u0435 (pedestrian) \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u044d\u0442\u043e\u0439:  <\/p>\n<pre><code class=\"swift\">import Foundation  struct Tennants: Codable {     let renters: [Renter]          enum CodingKeys: String, CodingKey {         case renters = \"people\"     } }  struct Renter: Codable {     let name: String     let mobile: Int     let hasPets: Bool     let pets: [String]     let address: Address }  struct Address: Codable {     let permanent, current: String }  \/\/ Later on... do {     let decoder = JSONDecoder()     let people: Tennants = try decoder.decode(Tennants.Type,                                                from: data)     print(people) } catch {     Swift.debugPrint(\"Unable to decode response: \\(error.localizedDescription)\") }<\/code><\/pre>\n<p>\u0438 \u043f\u0440\u043e\u0441\u0442\u043e print (\u0438\u043b\u0438\u00a0<a href=\"https:\/\/www.swiftjectivec.com\/swift-debug-print-print-dump-mirror-reflection\/\" rel=\"noopener noreferrer nofollow\">dump, .Swift.DebugPrint, Mirror(reflecting:)<\/a>) \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"swift\">Tennants(renters: [SwiftUI_Playgrounds.Renter(name: \"David\", mobile: 33333333, hasPets: true, pets: [\"Dog\", \"Fish\", \"Bird\"], address: SwiftUI_Playgrounds.Address(permanent: \"France\", current: \"UK\")), SwiftUI_Playgrounds.Renter(name: \"Jordan\", mobile: 33333333, hasPets: false, pets: [], address: SwiftUI_Playgrounds.Address(permanent: \"Austrailia\", current: \"US\")), SwiftUI_Playgrounds.Renter(name: \"Peter\", mobile: 33333333, hasPets: true, pets: [\"Lizard\"], address: SwiftUI_Playgrounds.Address(permanent: \"India\", current: \"FR\")), SwiftUI_Playgrounds.Renter(name: \"Sarah\", mobile: 33333333, hasPets: false, pets: [], address: SwiftUI_Playgrounds.Address(permanent: \"Egypt\", current: \"US\")), SwiftUI_Playgrounds.Renter(name: \"Rory\", mobile: 33333333, hasPets: true, pets: [\"Snakes\"], address: SwiftUI_Playgrounds.Address(permanent: \"United Kingdom\", current: \"US\"))])<\/code><\/pre>\n<p>\u0412 \u043a\u0440\u0430\u0439\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044d\u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u0438, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 DataFrame TabularData \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u0442\u0435 \u044d\u0442\u043e? \u0427\u0442\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0438\u0441\u043a\u043d\u0435\u043c \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0447\u0443\u0442\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435. \u0413\u043b\u044f\u043d\u044c\u0442\u0435 \u043d\u0430 \u044d\u0442\u043e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/739\/ab9\/18c\/739ab918cec919265a4520258823c1ed.webp\" alt=\"\" title=\"\" width=\"1097\" height=\"167\"\/><\/figure>\n<p>\u0420\u0430\u0437\u0432\u0435 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e??<\/p>\n<p>\u042f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u0438\u043a\u0443, \u043a\u043e\u0433\u0434\u0430 \u043b\u044e\u0431\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p>\u042f \u0438\u043c\u0435\u044e \u0434\u0435\u043b\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u044f \u0445\u043e\u0447\u0443 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u041c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438<\/p>\n<\/li>\n<li>\n<p>\u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435<\/p>\n<\/li>\n<\/ul>\n<p>&#8230; \u0438 \u044f \u043e\u0431\u043e\u0436\u0430\u044e \u044d\u0442\u043e. \u041a\u043e\u0434 \u0434\u043b\u044f \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u0435\u043d:<\/p>\n<pre><code class=\"swift\">do {     let people = try await loadPeople()     let data = try JSONEncoder().encode(people.renters)      \/\/ Create the DataFrame from .json data     let dataFrame = try DataFrame(jsonData: data)      \/\/ Beautiful print     print(dataFrame.description(options: .init(maximumLineWidth: 250))) } catch {     Swift.debugPrint(\"Unable to create DataFrame: \\(error.localizedDescription)\") }<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 options:. \u0422\u0430\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u044b, \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u0434\u0440\u0443\u0433\u0438\u043c. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0433\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u0430 \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0441 \u0444\u043e\u0440\u043c\u0430\u0442, \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 DataFrame.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0432\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0442\u0435\u043b \u0437\u043d\u0430\u0442\u044c, \u0443 \u043a\u043e\u0433\u043e \u0438\u0437 \u0430\u0440\u0435\u043d\u0434\u0430\u0442\u043e\u0440\u043e\u0432 \u0431\u044b\u043b\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0435 \u0438 \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u0437\u0430 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0435?<\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 DataFrame \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e, \u043d\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435, \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u0432\u0430\u0441 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432:<\/p>\n<pre><code class=\"swift\">do {     let people = try await loadPeople()     let data = try JSONEncoder().encode(people.renters)      \/\/ Create the DataFrame from .json data     let dataFrame = try DataFrame(jsonData: data)      \/\/ Just get names and pets     let partialFrame = dataFrame.selecting(columnNames: \"name\", \"pets\")     print(partialFrame) } catch {     Swift.debugPrint(\"Unable to create DataFrame: \\(error.localizedDescription)\") }  \/\/ Results in... \u250f\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 \u2503   \u2503 name     \u2503 pets                                            \u2503 \u2503   \u2503  \u2503 >>                          \u2503 \u2521\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502 0 \u2502 David    \u2502 [Optional(Dog), Optional(Fish), Optional(Bird)] \u2502 \u2502 1 \u2502 Jordan   \u2502 []                                              \u2502 \u2502 2 \u2502 Peter    \u2502 [Optional(Lizard)]                              \u2502 \u2502 3 \u2502 Sarah    \u2502 []                                              \u2502 \u2502 4 \u2502 Rory     \u2502 [Optional(Snakes)]                              \u2502 \u2514\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 5 rows, 2 columns<\/code><\/pre>\n<p>\u0422\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Swift, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u0412\u044b \u043f\u043e\u043d\u044f\u043b\u0438 \u0438\u0434\u0435\u044e, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430, \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b:  <\/p>\n<pre><code class=\"swift\">do {     let people = try await loadPeople()     let data = try JSONEncoder().encode(people.renters)      \/\/ Create the DataFrame from .json data     let dataFrame = try DataFrame(jsonData: data)      \/\/ Select only names, and sort them     let sortedNames = dataFrame.sorted(on: .init(\"name\", String.self), by: { lhs, rhs in         lhs &lt; rhs     }).selecting(columnNames: \"name\")     print(sortedNames.description) } catch {     Swift.debugPrint(\"Unable to create DataFrame: \\(error.localizedDescription)\") }  \/\/ Results in... \u250f\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 \u2503   \u2503 name     \u2503 \u2503   \u2503  \u2503 \u2521\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502 0 \u2502 David    \u2502 \u2502 1 \u2502 Jordan   \u2502 \u2502 2 \u2502 Peter    \u2502 \u2502 3 \u2502 Rory     \u2502 \u2502 4 \u2502 Sarah    \u2502 \u2514\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 5 rows, 1 column<\/code><\/pre>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0437\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0434\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e numericSummary.<\/p>\n<p>\u042f \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u0442\u043e\u0447\u043d\u044f\u044e \u0441\u0443\u0442\u044c, \u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e, \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u044f \u043b\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e DataFrame \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u044e, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0434\u043e\u043b\u0433\u043e\u0442\u0443 \u0438 \u0448\u0438\u0440\u043e\u0442\u0443, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0438\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 combineColumns (into:transform), \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b CLLocation \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u043a\u0430 \u043a\u0442\u043e-\u0442\u043e \u0438\u0449\u0435\u0442 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u043e\u0438\u0441\u043a\u0430. \u0418\u043b\u0438 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c SQL-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 DataFrame, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f joined(on:).<\/p>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e.<\/p>\n<p><strong><em>let concatenatedThoughts = &#171;&#187;&#187;<\/em><\/strong><\/p>\n<p><strong><em>There are several ways to spin up a DataFrame, too. You can use local .csv or .json files, or their raw data and more. Be sure to check out the docs.&#187;&#187;&#187;<\/em><\/strong>  <\/p>\n<p>\u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0442.\u0435. \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435, \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c, \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0435\u0438\u0432\u0430\u0442\u044c \u0438\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0445 \u043c\u043e\u0449\u043d\u044b\u0439 (\u044f \u0437\u043d\u0430\u044e, \u044d\u0442\u043e \u043a\u043b\u0438\u0448\u0435) API.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0430\u0447\u043a\u0430\u0442\u044c \u0440\u0443\u043a\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 DataFrame, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c \u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043d\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u043a\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c, \u0438\u043b\u0438 \u043f\u043e\u0449\u0443\u043f\u0430\u0442\u044c \u0435\u0433\u043e API:<\/p>\n<pre><code class=\"swift\">let testFrame: DataFrame = [     \"id\": [0, 1, 2, 3, 4],     \"job\": [\"developer\", \"designer\", \"pm\", \"em\", \"staff SWE\"],     \"fillBy\": [\"jordan\", \"jansyn\", \"bennett\", \"remy\", \"baylor\"] ]          print(testFrame.description)  \/\/ Results in... \u250f\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 \u2503   \u2503 id    \u2503 job       \u2503 fillBy   \u2503 \u2503   \u2503  \u2503   \u2503  \u2503 \u2521\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502 0 \u2502     0 \u2502 developer \u2502 jordan   \u2502 \u2502 1 \u2502     1 \u2502 designer  \u2502 jansyn   \u2502 \u2502 2 \u2502     2 \u2502 pm        \u2502 bennett  \u2502 \u2502 3 \u2502     3 \u2502 em        \u2502 remy     \u2502 \u2502 4 \u2502     4 \u2502 staff SWE \u2502 baylor   \u2502 \u2514\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 5 rows, 3 columns<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, Cupertino &amp; Friends\u2122 \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0438, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a TabularData \u0434\u043b\u044f&#8230; \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438? \u042d\u0442\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043b\u0438\u043d\u0433\u0432\u0430 \u0444\u0440\u0430\u043d\u043a\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0438 \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u043b\u044e\u0434\u044c\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u044f\u0442 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u201c\u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u201d \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<p>\u041d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043c\u044b \u0437\u0434\u0435\u0441\u044c, \u0438 \u044d\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u0414\u043e \u0441\u043a\u043e\u0440\u043e\u0433\u043e \u270c<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/736072\/\"> https:\/\/habr.com\/ru\/articles\/736072\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u00a0<a href=\"https:\/\/developer.apple.com\/documentation\/tabulardata\" rel=\"noopener noreferrer nofollow\">TabularData\u00a0<\/a>\u043d\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u043e\u0440\u043e\u0442\u044b, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. \u041d\u043e \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0439\u0442\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043d\u0430 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0441 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u043e\u043a\u043e\u0435, \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c \u043f\u0430\u0440\u043d\u0435\u043c \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0441\u0438\u043b\u0430.  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 .csv \u0444\u0430\u0439\u043b\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 .json \u0444\u0430\u0439\u043b\u044b<\/p>\n<\/li>\n<li>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442 \u0438\u043b\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0439\u0442\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043b\u043e\u0433\u0438 \u0432 \u0441\u0432\u043e\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0433\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0433\u043e, \u043d\u043e \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0440\u044e\u043a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, &#8212; \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0430 \u2116 4 \u0432\u044b\u0448\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u0442\u0435\u0431\u044f \u0435\u0441\u0442\u044c.json, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u044d\u0442\u043e\u043c\u0443:<\/p>\n<pre><code class=\"swift\">{     \"people\":[         {             \"name\": \"David\",             \"mobile\": 33333333,             \"hasPets\": true,             \"pets\": [\"Dog\", \"Fish\", \"Bird\"],             \"address\": {                 \"permanent\": \"France\",                 \"current\": \"UK\"             }         },         {             \"name\": \"Jordan\",             \"mobile\": 33333333,             \"hasPets\": false,             \"pets\": [],             \"address\": {                 \"permanent\": \"Austrailia\",                 \"current\": \"US\"             }         }     ] }<\/code><\/pre>\n<p>\u041d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\u2026.\u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u0414\u0430\u0436\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c? \u0421\u043a\u0430\u0436\u0435\u043c, 1000 \u0438\u043b\u0438 \u043e\u043a\u043e\u043b\u043e \u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0415\u0441\u043b\u0438 \u0431\u044b \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0435\u0448\u0435\u0445\u043e\u0434\u043d\u044b\u0435 (pedestrian) \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u044d\u0442\u043e\u0439:  <\/p>\n<pre><code class=\"swift\">import Foundation  struct Tennants: Codable {     let renters: [Renter]          enum CodingKeys: String, CodingKey {         case renters = \"people\"     } }  struct Renter: Codable {     let name: String     let mobile: Int     let hasPets: Bool     let pets: [String]     let address: Address }  struct Address: Codable {     let permanent, current: String }  \/\/ Later on... do {     let decoder = JSONDecoder()     let people: Tennants = try decoder.decode(Tennants.Type,                                                from: data)     print(people) } catch {     Swift.debugPrint(\"Unable to decode response: \\(error.localizedDescription)\") }<\/code><\/pre>\n<p>\u0438 \u043f\u0440\u043e\u0441\u0442\u043e print (\u0438\u043b\u0438\u00a0<a href=\"https:\/\/www.swiftjectivec.com\/swift-debug-print-print-dump-mirror-reflection\/\" rel=\"noopener noreferrer nofollow\">dump, .Swift.DebugPrint, Mirror(reflecting:)<\/a>) \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e:  <\/p>\n<pre><code class=\"swift\">Tennants(renters: [SwiftUI_Playgrounds.Renter(name: \"David\", mobile: 33333333, hasPets: true, pets: [\"Dog\", \"Fish\", \"Bird\"], address: SwiftUI_Playgrounds.Address(permanent: \"France\", current: \"UK\")), SwiftUI_Playgrounds.Renter(name: \"Jordan\", mobile: 33333333, hasPets: false, pets: [], address: SwiftUI_Playgrounds.Address(permanent: \"Austrailia\", current: \"US\")), SwiftUI_Playgrounds.Renter(name: \"Peter\", mobile: 33333333, hasPets: true, pets: [\"Lizard\"], address: SwiftUI_Playgrounds.Address(permanent: \"India\", current: \"FR\")), SwiftUI_Playgrounds.Renter(name: \"Sarah\", mobile: 33333333, hasPets: false, pets: [], address: SwiftUI_Playgrounds.Address(permanent: \"Egypt\", current: \"US\")), SwiftUI_Playgrounds.Renter(name: \"Rory\", mobile: 33333333, hasPets: true, pets: [\"Snakes\"], address: SwiftUI_Playgrounds.Address(permanent: \"United Kingdom\", current: \"US\"))])<\/code><\/pre>\n<p>\u0412 \u043a\u0440\u0430\u0439\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044d\u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u0438, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 DataFrame TabularData \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u0442\u0435 \u044d\u0442\u043e? \u0427\u0442\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0438\u0441\u043a\u043d\u0435\u043c \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0447\u0443\u0442\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435. \u0413\u043b\u044f\u043d\u044c\u0442\u0435 \u043d\u0430 \u044d\u0442\u043e:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0420\u0430\u0437\u0432\u0435 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e??<\/p>\n<p>\u042f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u0438\u043a\u0443, \u043a\u043e\u0433\u0434\u0430 \u043b\u044e\u0431\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442:<\/p>\n<ul>\n<li>\n<p>\u042f \u0438\u043c\u0435\u044e \u0434\u0435\u043b\u043e \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u044f \u0445\u043e\u0447\u0443 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/li>\n<li>\n<p>\u041c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043c\u043e\u0434\u0435\u043b\u0438<\/p>\n<\/li>\n<li>\n<p>\u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435<\/p>\n<\/li>\n<\/ul>\n<p>&#8230; \u0438 \u044f \u043e\u0431\u043e\u0436\u0430\u044e \u044d\u0442\u043e. \u041a\u043e\u0434 \u0434\u043b\u044f \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u0435\u043d:<\/p>\n<pre><code class=\"swift\">do {     let people = try await loadPeople()     let data = try JSONEncoder().encode(people.renters)      \/\/ Create the DataFrame from .json data     let dataFrame = try DataFrame(jsonData: data)      \/\/ Beautiful print     print(dataFrame.description(options: .init(maximumLineWidth: 250))) } catch {     Swift.debugPrint(\"Unable to create DataFrame: \\(error.localizedDescription)\") }<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 options:. \u0422\u0430\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u044b, \u0448\u0438\u0440\u0438\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u0434\u0440\u0443\u0433\u0438\u043c. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0433\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u044b\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u0430 \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0441 \u0444\u043e\u0440\u043c\u0430\u0442, \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 DataFrame.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0432\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0442\u0435\u043b \u0437\u043d\u0430\u0442\u044c, \u0443 \u043a\u043e\u0433\u043e \u0438\u0437 \u0430\u0440\u0435\u043d\u0434\u0430\u0442\u043e\u0440\u043e\u0432 \u0431\u044b\u043b\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0435 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0435 \u0438 \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u0438 \u0437\u0430 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0435?<\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 DataFrame \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e, \u043d\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435, \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u0432\u0430\u0441 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432:<\/p>\n<pre><code class=\"swift\">do {     let people = try await loadPeople()     let data = try JSONEncoder().encode(people.renters)      \/\/ Create the DataFrame from .json data     let dataFrame = try DataFrame(jsonData: data)      \/\/ Just get names and pets     let partialFrame = dataFrame.selecting(columnNames: \"name\", \"pets\")     print(partialFrame) } catch {     Swift.debugPrint(\"Unable to create DataFrame: \\(error.localizedDescription)\") }  \/\/ Results in... \u250f\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 \u2503   \u2503 name     \u2503 pets                                            \u2503 \u2503   \u2503  \u2503 >>                          \u2503 \u2521\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502 0 \u2502 David    \u2502 [Optional(Dog), Optional(Fish), Optional(Bird)] \u2502 \u2502 1 \u2502 Jordan   \u2502 []                                              \u2502 \u2502 2 \u2502 Peter    \u2502 [Optional(Lizard)]                              \u2502 \u2502 3 \u2502 Sarah    \u2502 []                                              \u2502 \u2502 4 \u2502 Rory     \u2502 [Optional(Snakes)]                              \u2502 \u2514\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 5 rows, 2 columns<\/code><\/pre>\n<p>\u0422\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Swift, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u0412\u044b \u043f\u043e\u043d\u044f\u043b\u0438 \u0438\u0434\u0435\u044e, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430, \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b:  <\/p>\n<pre><code class=\"swift\">do {     let people = try await loadPeople()     let data = try JSONEncoder().encode(people.renters)      \/\/ Create the DataFrame from .json data     let dataFrame = try DataFrame(jsonData: data)      \/\/ Select only names, and sort them     let sortedNames = dataFrame.sorted(on: .init(\"name\", String.self), by: { lhs, rhs in         lhs &lt; rhs     }).selecting(columnNames: \"name\")     print(sortedNames.description) } catch {     Swift.debugPrint(\"Unable to create DataFrame: \\(error.localizedDescription)\") }  \/\/ Results in... \u250f\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 \u2503   \u2503 name     \u2503 \u2503   \u2503  \u2503 \u2521\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502 0 \u2502 David    \u2502 \u2502 1 \u2502 Jordan   \u2502 \u2502 2 \u2502 Peter    \u2502 \u2502 3 \u2502 Rory     \u2502 \u2502 4 \u2502 Sarah    \u2502 \u2514\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 5 rows, 1 column<\/code><\/pre>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0437\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0441\u0442\u043e\u043b\u0431\u0446\u044b \u0434\u043b\u044f \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e numericSummary.<\/p>\n<p>\u042f \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u0442\u043e\u0447\u043d\u044f\u044e \u0441\u0443\u0442\u044c, \u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e, \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u044f \u043b\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e DataFrame \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u044e, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0434\u043e\u043b\u0433\u043e\u0442\u0443 \u0438 \u0448\u0438\u0440\u043e\u0442\u0443, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0438\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 combineColumns (into:transform), \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b CLLocation \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u043a\u0430 \u043a\u0442\u043e-\u0442\u043e \u0438\u0449\u0435\u0442 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u043e\u0438\u0441\u043a\u0430. \u0418\u043b\u0438 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c SQL-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 DataFrame, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f joined(on:).<\/p>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e.<\/p>\n<p><strong><em>let concatenatedThoughts = &#171;&#187;&#187;<\/em><\/strong><\/p>\n<p><strong><em>There are several ways to spin up a DataFrame, too. You can use local .csv or .json files, or their raw data and more. Be sure to check out the docs.&#187;&#187;&#187;<\/em><\/strong>  <\/p>\n<p>\u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0442.\u0435. \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u043b\u0438 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435, \u0432 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c, \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0435\u0438\u0432\u0430\u0442\u044c \u0438\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0445 \u043c\u043e\u0449\u043d\u044b\u0439 (\u044f \u0437\u043d\u0430\u044e, \u044d\u0442\u043e \u043a\u043b\u0438\u0448\u0435) API.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0430\u0447\u043a\u0430\u0442\u044c \u0440\u0443\u043a\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 DataFrame, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u043d\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c \u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043d\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u043a\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c, \u0438\u043b\u0438 \u043f\u043e\u0449\u0443\u043f\u0430\u0442\u044c \u0435\u0433\u043e API:<\/p>\n<pre><code class=\"swift\">let testFrame: DataFrame = [     \"id\": [0, 1, 2, 3, 4],     \"job\": [\"developer\", \"designer\", \"pm\", \"em\", \"staff SWE\"],     \"fillBy\": [\"jordan\", \"jansyn\", \"bennett\", \"remy\", \"baylor\"] ]          print(testFrame.description)  \/\/ Results in... \u250f\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513 \u2503   \u2503 id    \u2503 job       \u2503 fillBy   \u2503 \u2503   \u2503  \u2503   \u2503  \u2503 \u2521\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529 \u2502 0 \u2502     0 \u2502 developer \u2502 jordan   \u2502 \u2502 1 \u2502     1 \u2502 designer  \u2502 jansyn   \u2502 \u2502 2 \u2502     2 \u2502 pm        \u2502 bennett  \u2502 \u2502 3 \u2502     3 \u2502 em        \u2502 remy     \u2502 \u2502 4 \u2502     4 \u2502 staff SWE \u2502 baylor   \u2502 \u2514\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 5 rows, 3 columns<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, Cupertino &amp; Friends\u2122 \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0438, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a TabularData \u0434\u043b\u044f&#8230; \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438? \u042d\u0442\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043b\u0438\u043d\u0433\u0432\u0430 \u0444\u0440\u0430\u043d\u043a\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0438 \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u043b\u044e\u0434\u044c\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u044f\u0442 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u201c\u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u201d \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<p>\u041d\u043e \u0432\u0441\u0435 \u0436\u0435 \u043c\u044b \u0437\u0434\u0435\u0441\u044c, \u0438 \u044d\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u0414\u043e \u0441\u043a\u043e\u0440\u043e\u0433\u043e \u270c<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/736072\/\"> https:\/\/habr.com\/ru\/articles\/736072\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-403132","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/403132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=403132"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/403132\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=403132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=403132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=403132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}