{"id":108945,"date":"2021-10-29T09:40:00","date_gmt":"2021-10-29T13:40:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=108945"},"modified":"2022-11-21T09:48:50","modified_gmt":"2022-11-21T14:48:50","slug":"pickle-python-how-to-use-need-and-example","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/","title":{"rendered":"Pickle Python &#8211; How to use, Need and Example"},"content":{"rendered":"\n<p><strong><em>Excerpt<\/em><\/strong><\/p>\n\n\n\n<p>As analysts, we spend a lot of time processing, transforming and inferring data, we handle large amounts of data and devote a great deal of time to its analysis and manipulation.<\/p>\n\n\n\n<p>It is convenient to have a mechanism that allows us to save the processed data for future retrieval without going through the same costly process again. Pickle is a utility that allows us to save Python objects in a binary file. In other words:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Pickle allows us to save time.<\/strong><\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-need-for-pickle-python\">The need for Pickle Python<\/h2>\n\n\n\n<p>When we process large amounts of data in our analysis and backtesting, the machine needs a few hours, if not days, to process all the information.<\/p>\n\n\n\n<p>The backtesting of a large portfolio of financial assets with historical data running into decades or the training of our ML algorithms are heavy processes from the point of view of the machine time needed to digest the data.<\/p>\n\n\n\n<p>Repeating this procedure over and over again, most of the time, is pointless and a waste of time and resources. So it is convenient to have a mechanism that allows us to save the processed data for future retrieval without having to repeat the same costly process.<\/p>\n\n\n\n<p>In Python there are multiple mechanisms and formats such as plain text files, binary files and structured and unstructured databases.<\/p>\n\n\n\n<p>Among the most popular plain text files are csv (comma separated values), json (JavaScript Object Notation) or xml (eXtended Markup Language). &nbsp;The main feature of plain text files is that they are human-readable and can be exchanged between machines.<\/p>\n\n\n\n<p>Structured and unstructured databases are able to store large amounts of information, relate data to each other and provide fast and accurate answers to queries.<\/p>\n\n\n\n<p>Finally, we can use binary files to store the information. These files are not human-readable since they store bytes of information that can only be understood by machines.<\/p>\n\n\n\n<p>Their main characteristic is the speed of storage\/retrieval and the small size compared to the previous ones. Pickle is a utility that allows us to save Python objects in a binary file.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-pickle-python\">What is Pickle Python?<\/h2>\n\n\n\n<p>From the&nbsp;<a href=\"https:\/\/docs.python.org\/3\/library\/pickle.html\" target=\"_blank\" rel=\"noreferrer noopener\">official documentation<\/a>, the technical explanation about Pickle Python is as follows:<\/p>\n\n\n\n<p><em>The<\/em><a href=\"https:\/\/docs.python.org\/3\/library\/pickle.html#module-pickle\" target=\"_blank\" rel=\"noreferrer noopener\"><em>&nbsp;pickle<\/em><\/a><em>&nbsp;module implements binary protocols for serializing and de-serializing a Python object structure.<\/em><\/p>\n\n\n\n<p><em>\u201cPickling\u201d is the process whereby a Python object hierarchy is converted into a byte stream, and \u201cunpickling\u201d is the inverse operation, whereby a byte stream (from a<\/em><a href=\"https:\/\/docs.python.org\/3\/glossary.html#term-binary-file\" target=\"_blank\" rel=\"noreferrer noopener\"><em>&nbsp;binary file<\/em><\/a><em>&nbsp;or<\/em><a href=\"https:\/\/docs.python.org\/3\/glossary.html#term-bytes-like-object\" target=\"_blank\" rel=\"noreferrer noopener\"><em>&nbsp;bytes-like object<\/em><\/a><em>) is converted back into an object hierarchy.<\/em><\/p>\n\n\n\n<p><em>Pickling (and unpickling) is alternatively known as \u201cserialization\u201d, \u201cmarshalling,\u201d<\/em><a href=\"https:\/\/docs.python.org\/3\/library\/pickle.html#id7\" target=\"_blank\" rel=\"noreferrer noopener\"><em>&nbsp;<sup>1<\/sup><\/em><\/a><em>&nbsp;or \u201cflattening\u201d; however, to avoid confusion, the terms used here are \u201cpickling\u201d and \u201cunpickling\u201d.<\/em><\/p>\n\n\n\n<p>For simplicity, we can say that Pickle stores and retrieves Python objects to\/from the machine&#8217;s RAM.<\/p>\n\n\n\n<p>It is important to remember here that in Python even variables are objects and that regardless of where the data we are handling comes from, the information resides in the machine&#8217;s volatile memory, also called RAM (Random Access Memory).<\/p>\n\n\n\n<p>Unless we save this information in a storage system such as a hard disk, in any file format kind or database, the information is lost at the end of the Python session.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"example-of-pickle-python\">Example of Pickle Python<\/h2>\n\n\n\n<p>Let\u2019s suppose the following scenarios.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"pickle-python-scenario-1\">Pickle Python Scenario 1<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"638\" height=\"91\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pickle-python-example-high-level-abstraction-quantinsti.png\" alt=\"\" class=\"wp-image-108959 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pickle-python-example-high-level-abstraction-quantinsti.png 638w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pickle-python-example-high-level-abstraction-quantinsti-300x43.png 300w\" data-sizes=\"(max-width: 638px) 100vw, 638px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 638px; aspect-ratio: 638\/91;\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>Pickle Python example &#8211; High level abstraction<\/em><\/p>\n\n\n\n<p>The figure shows a very high level abstraction typically seen in a ML project.<\/p>\n\n\n\n<p>The&nbsp;<strong>ETL<\/strong>&nbsp;(Extraction, Transformation and Load) is the tool for:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>E<\/strong>xtract or fetch data from the data source,<\/li><li><strong>T<\/strong>ransform the data by cleaning, sanitizing, checking, resumes, inferences, relations, etc. and finally<\/li><li><strong>L<\/strong>oad in a database, save csv\/hdf5 files or load into the model directly.<\/li><\/ul>\n\n\n\n<p>The&nbsp;<strong>Model Training<\/strong>&nbsp;is the most cumbersome process from the point of view of CPU time, it is also a very cumbersome process from the analyst&#8217;s point of view as the model requires adjustments until it is trained.<\/p>\n\n\n\n<p>Once the model has been trained and adjusted, it is necessary to&nbsp;<strong>test the model<\/strong>&#8216;s performance and verify if it fits the training provided.<\/p>\n\n\n\n<p><em>Visit QuantInsti to read the full article: <a href=\"https:\/\/blog.quantinsti.com\/pickle-python\/\">https:\/\/blog.quantinsti.com\/pickle-python\/<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pickle is a utility that allows us to save Python objects in a binary file. <\/p>\n","protected":false},"author":387,"featured_media":36044,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,349,338,341,352,344],"tags":[5121,806,852,10562],"contributors-categories":[13654],"class_list":{"0":"post-108945","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-development","12":"category-quant-north-america","13":"category-quant-regions","14":"tag-big-data","15":"tag-data-science","16":"tag-machine-learning","17":"tag-pickle-python","18":"contributors-categories-quantinsti"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Pickle Python &#8211; How to use, Need and Example<\/title>\n<meta name=\"description\" content=\"Pickle is a utility that allows us to save Python objects in a binary file.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/108945\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pickle Python - How to use, Need and Example | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"Pickle is a utility that allows us to save Python objects in a binary file.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-29T13:40:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:48:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/python-binary.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mario Pisa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mario Pisa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Mario Pisa\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/f2bfe36ae4f6f088b98f90558d37ed12\"\n\t            },\n\t            \"headline\": \"Pickle Python &#8211; How to use, Need and Example\",\n\t            \"datePublished\": \"2021-10-29T13:40:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:50+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/\"\n\t            },\n\t            \"wordCount\": 705,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/python-binary.jpg\",\n\t            \"keywords\": [\n\t                \"Big Data\",\n\t                \"Data Science\",\n\t                \"Machine Learning\",\n\t                \"Pickle Python\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant North America\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/\",\n\t            \"name\": \"Pickle Python - How to use, Need and Example | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/python-binary.jpg\",\n\t            \"datePublished\": \"2021-10-29T13:40:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:50+00:00\",\n\t            \"description\": \"Pickle is a utility that allows us to save Python objects in a binary file.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pickle-python-how-to-use-need-and-example\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/python-binary.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/python-binary.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 540,\n\t            \"caption\": \"Python\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/f2bfe36ae4f6f088b98f90558d37ed12\",\n\t            \"name\": \"Mario Pisa\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/mariopisa\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pickle Python &#8211; How to use, Need and Example","description":"Pickle is a utility that allows us to save Python objects in a binary file.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/108945\/","og_locale":"en_US","og_type":"article","og_title":"Pickle Python - How to use, Need and Example | IBKR Quant Blog","og_description":"Pickle is a utility that allows us to save Python objects in a binary file.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/","og_site_name":"IBKR Campus US","article_published_time":"2021-10-29T13:40:00+00:00","article_modified_time":"2022-11-21T14:48:50+00:00","og_image":[{"width":900,"height":540,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/python-binary.jpg","type":"image\/jpeg"}],"author":"Mario Pisa","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mario Pisa","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/"},"author":{"name":"Mario Pisa","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/f2bfe36ae4f6f088b98f90558d37ed12"},"headline":"Pickle Python &#8211; How to use, Need and Example","datePublished":"2021-10-29T13:40:00+00:00","dateModified":"2022-11-21T14:48:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/"},"wordCount":705,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/python-binary.jpg","keywords":["Big Data","Data Science","Machine Learning","Pickle Python"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Development","Quant North America","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/","name":"Pickle Python - How to use, Need and Example | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/python-binary.jpg","datePublished":"2021-10-29T13:40:00+00:00","dateModified":"2022-11-21T14:48:50+00:00","description":"Pickle is a utility that allows us to save Python objects in a binary file.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pickle-python-how-to-use-need-and-example\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/python-binary.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/python-binary.jpg","width":900,"height":540,"caption":"Python"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/f2bfe36ae4f6f088b98f90558d37ed12","name":"Mario Pisa","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/mariopisa\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/python-binary.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/108945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/387"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=108945"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/108945\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/36044"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=108945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=108945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=108945"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=108945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}