{"id":106460,"date":"2021-10-11T11:50:04","date_gmt":"2021-10-11T15:50:04","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=106460"},"modified":"2022-11-21T09:48:20","modified_gmt":"2022-11-21T14:48:20","slug":"false-alternatives-to-pandas","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/","title":{"rendered":"False Alternatives to Pandas"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-background\"><strong>Background<\/strong><\/h2>\n\n\n\n<p>If you\u2019ve done any type of data analysis in Python, chances are you\u2019ve probably used&nbsp;<strong>pandas<\/strong>. Though widely used in the data world, if you\u2019ve run into space or computational issues with it, you\u2019re not alone. This post discusses several faster alternatives to&nbsp;<strong>pandas<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-r-s-data-table-in-python\"><strong>R\u2019s data table in Python<\/strong><\/h2>\n\n\n\n<p>If you\u2019ve used R, you\u2019re probably familiar with the&nbsp;<strong>data.table<\/strong>&nbsp;package. A port of this library is also available in Python. In this example, we show how you can read in a CSV file faster than using standard&nbsp;<strong>pandas<\/strong>. For our purposes, we\u2019ll be using an open source dataset from the&nbsp;<a href=\"https:\/\/archive.ics.uci.edu\/ml\/datasets.php?format=&amp;task=&amp;att=&amp;area=&amp;numAtt=&amp;numIns=&amp;type=&amp;sort=instDown&amp;view=table\">UCI repository<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import datatable\n \nstart = time.time()\nos_scan_data = datatable.fread(\"OS Scan_dataset.csv\", header = None)\nend = time.time()\n \nprint(end - start)\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"130\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/python-data-table-theautomatic-net.png\" alt=\"\" class=\"wp-image-106470 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/python-data-table-theautomatic-net.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/python-data-table-theautomatic-net-300x61.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/130;\" \/><\/figure>\n\n\n\n<p>Using&nbsp;<strong>datatable<\/strong>, we can read in the CSV file in ~20 seconds. Reading the same file using&nbsp;<strong>pandas<\/strong>&nbsp;takes almost 76 seconds!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"130\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandas-slow-read-csv-theautomatic-net.png\" alt=\"\" class=\"wp-image-106474 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandas-slow-read-csv-theautomatic-net.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandas-slow-read-csv-theautomatic-net-300x61.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/130;\" \/><\/figure>\n\n\n\n<p>Next, we can also sort faster with&nbsp;<strong>datatable<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>start = time.time()\nos_scan_data&#91;0].sort()\nend = time.time()\n \nprint(end - start)<\/code><\/pre>\n\n\n\n<p>In&nbsp;<strong>datatable<\/strong>, this takes ~0.002 seconds, but takes ~0.934 seconds in&nbsp;<strong>pandas<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image img-twothird\"><img decoding=\"async\" width=\"562\" height=\"250\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/python-faster-sort-theautomatic-net.png\" alt=\"\" class=\"wp-image-106482 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/python-faster-sort-theautomatic-net.png 562w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/python-faster-sort-theautomatic-net-300x133.png 300w\" data-sizes=\"(max-width: 562px) 100vw, 562px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 562px; aspect-ratio: 562\/250;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image img-twothird\"><img decoding=\"async\" width=\"576\" height=\"246\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandas-sort-series-theautomatic-net.png\" alt=\"\" class=\"wp-image-106582 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandas-sort-series-theautomatic-net.png 576w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandas-sort-series-theautomatic-net-300x128.png 300w\" data-sizes=\"(max-width: 576px) 100vw, 576px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 576px; aspect-ratio: 576\/246;\" \/><\/figure>\n\n\n\n<p>In a later article, we\u2019ll go into more detail with&nbsp;<strong>datatable<\/strong>. You can check out its documentation by&nbsp;<a href=\"https:\/\/datatable.readthedocs.io\/en\/latest\/\">clicking here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The modin package<\/strong><\/h2>\n\n\n\n<p><strong>modin<\/strong>&nbsp;is another&nbsp;<strong>pandas<\/strong>&nbsp;alternative to speed up&nbsp;<strong>functions<\/strong>&nbsp;while keeping the syntax largely the same.&nbsp;<strong>modin<\/strong>&nbsp;works by utilizing the multiple cores available on a machine (like your laptop, for instance) to run&nbsp;<strong>pandas<\/strong>&nbsp;operations in parallel. Since most laptops have between four and eight cores, this means you can still have a performance boost even without using a more powerful server.<\/p>\n\n\n\n<p>First, let\u2019s install&nbsp;<strong>modin<\/strong>&nbsp;using pip. For this step, we\u2019re going to install all the dependencies, which includes&nbsp;<strong>dask<\/strong>&nbsp;and&nbsp;<strong>ray<\/strong>. These will not be installed if you leave out the \u201c[all]\u201d piece of the installation command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install modin&#91;all]<\/code><\/pre>\n\n\n\n<p>Next, we can get started by importing the package like below. We\u2019ll also import the&nbsp;<strong>time<\/strong>&nbsp;package to compare runtimes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import modin.pandas as pd\nimport time<\/code><\/pre>\n\n\n\n<p>For this example, we\u2019ll be using the dataset found&nbsp;<a href=\"https:\/\/archive.ics.uci.edu\/ml\/machine-learning-databases\/00516\/os_scan\/\">here<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>os_scan_data = pd.read_csv(\"OS Scan_dataset.csv\", header = None)<\/code><\/pre>\n\n\n\n<p>Also, we\u2019re going to increase the size of the dataset artificially by simply duplicating the rows multiple times:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>combined_data = pd.concat(&#91;os_scan_data, os_scan_data, os_scan_data])<\/code><\/pre>\n\n\n\n<p>This gives us a dataset with over 5 millions rows and and 115 columns.<\/p>\n\n\n\n<p>Next, let\u2019s create a new column using the map function. Using&nbsp;<strong>modin<\/strong>, we\u2019ll able to generate the new field in around 0.03 seconds.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>start = time.time()\ncombined_data&#91;\"test\"] = combined_data&#91;9].map(lambda val: \"above\" if val &gt; 3 else \"below\")\nend = time.time()\n \nprint(end - start)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"117\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/modin-map-method-theautomatic-net.png\" alt=\"\" class=\"wp-image-106506 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/modin-map-method-theautomatic-net.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/modin-map-method-theautomatic-net-300x55.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/117;\" \/><\/figure>\n\n\n\n<p>If we were to use normal&nbsp;<strong>pandas<\/strong>, we get the following result at ~1.34 seconds.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"116\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/modin-vs.-pandas-map-function-theautomatic-net.png\" alt=\"\" class=\"wp-image-106591 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/modin-vs.-pandas-map-function-theautomatic-net.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/modin-vs.-pandas-map-function-theautomatic-net-300x54.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/116;\" \/><\/figure>\n\n\n\n<p>Check out more about&nbsp;<strong>modin<\/strong>&nbsp;by&nbsp;<a href=\"https:\/\/modin.readthedocs.io\/en\/latest\/\">clicking here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The PandaPy library<\/strong><\/h2>\n\n\n\n<p><strong>PandaPy<\/strong>&nbsp;is another alternative to&nbsp;<strong>pandas<\/strong>. According to its&nbsp;<a href=\"https:\/\/github.com\/firmai\/pandapy\">documentation page<\/a>,&nbsp;<strong>PandaPy<\/strong>&nbsp;is recommended as a potential faster alternative to&nbsp;<strong>pandas<\/strong>&nbsp;when the data you\u2019re dealing with has less than 50,000 rows, but possibly as high as 500,000 rows, depending on the data. Another benefit of this package is that it often reduces the amount of memory needed to store datasets when you have mixed data types.<\/p>\n\n\n\n<p><strong>PandaPy<\/strong>&nbsp;can be download via pip:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install pandapy<\/code><\/pre>\n\n\n\n<p>For this example, we\u2019ll use a&nbsp;<a href=\"https:\/\/www.kaggle.com\/mlg-ulb\/creditcardfraud\">credit card dataset<\/a>&nbsp;from Kaggle. Now, we can read in the data. In&nbsp;<strong>PandaPy<\/strong>, the dataset is read in as a structured array.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pandapy as pp\n \n# read in dataset\ncredit_data = pp.read(\"creditcard.csv\")\n \n# get descriptive stats\npp.describe(credit_data)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"365\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandapy-fast-theautomatic-net.png\" alt=\"\" class=\"wp-image-106519 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandapy-fast-theautomatic-net.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/pandapy-fast-theautomatic-net-300x171.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/365;\" \/><\/figure>\n\n\n\n<p>General column operations are similar \u2013 for example, we can divide two columns just like in&nbsp;<strong>pandas<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>credit_data&#91;\"V1\"] \/ credit_data&#91;\"V2\"]<\/code><\/pre>\n\n\n\n<p>Similarly, we can get the mean of a column just like&nbsp;<strong>pandas<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>credit_data&#91;\"V1\"].mean()<\/code><\/pre>\n\n\n\n<p>See documentation for&nbsp;<strong>PandaPy<\/strong>&nbsp;<a href=\"https:\/\/github.com\/firmai\/pandapy\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>numpy<\/strong><\/h2>\n\n\n\n<p>Several&nbsp;<strong>pandas<\/strong>&nbsp;functions can be implemented more efficiently using&nbsp;<strong>numpy<\/strong>. For example, if you want to calculate quantiles, like the 90% or 95%, etc., you can use either&nbsp;<strong>pandas<\/strong>&nbsp;or&nbsp;<strong>numpy<\/strong>. However,&nbsp;<strong>numpy<\/strong>&nbsp;will generally be faster.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># pandas\nstart = time.time()\n \nq = np.arange(0.05, 1, 0.05)\nquantiles = &#91;email_data.W.quantile(val) for val in q]\nend = time.time()\n \nprint(end - start)\n \n# numpy\nstart = time.time()\n \nq = np.arange(0.05, 1, 0.05)\nquantiles = &#91;np.quantile(email_data.W, val) for val in q]\nend = time.time()\n \nprint(end - start)<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"471\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/numpy-vs-pandas-theautomatic-net.png\" alt=\"\" class=\"wp-image-106541 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/numpy-vs-pandas-theautomatic-net.png 640w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/10\/numpy-vs-pandas-theautomatic-net-300x221.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; aspect-ratio: 640\/471;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>That\u2019s all for this post! These are just a few of the alternatives to&nbsp;<strong>pandas<\/strong>. If you\u2019d like to see tutorials on other alternatives, feel free to let me know. Also, if you enjoyed reading this article, make sure to share it with others! Check out my other Python posts by&nbsp;<a href=\"https:\/\/theautomatic.net\/category\/python\/\">clicking here<\/a>.<\/p>\n\n\n\n<p><em>Visit TheAutomatic.net for additional insight on this article: <a href=\"https:\/\/theautomatic.net\/2021\/10\/09\/faster-alternatives-to-pandas\/\">https:\/\/theautomatic.net\/2021\/10\/09\/faster-alternatives-to-pandas\/<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post discusses several faster alternatives to\u00a0pandas.<\/p>\n","protected":false},"author":388,"featured_media":99378,"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":[10490,806,10488,10489,1225,10492,1224,595,10491],"contributors-categories":[13695],"class_list":{"0":"post-106460","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-dask","15":"tag-data-science","16":"tag-datatable","17":"tag-modin","18":"tag-numpy","19":"tag-pandapy","20":"tag-pandas","21":"tag-python","22":"tag-ray","23":"contributors-categories-theautomatic-net"},"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.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>False Alternatives to Pandas | IBKR Quant<\/title>\n<meta name=\"description\" content=\"This post discusses several faster alternatives to\u00a0pandas.\" \/>\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\/106460\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"False Alternatives to Pandas | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"This post discusses several faster alternatives to\u00a0pandas.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-11T15:50:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:48:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/python-blocks.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andrew Treadway\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrew Treadway\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 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\\\/false-alternatives-to-pandas\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/false-alternatives-to-pandas\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Andrew Treadway\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\"\n\t            },\n\t            \"headline\": \"False Alternatives to Pandas\",\n\t            \"datePublished\": \"2021-10-11T15:50:04+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:20+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/false-alternatives-to-pandas\\\/\"\n\t            },\n\t            \"wordCount\": 693,\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\\\/false-alternatives-to-pandas\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/python-blocks.jpg\",\n\t            \"keywords\": [\n\t                \"dask\",\n\t                \"Data Science\",\n\t                \"datatable\",\n\t                \"modin\",\n\t                \"NumPy\",\n\t                \"PandaPy\",\n\t                \"Pandas\",\n\t                \"Python\",\n\t                \"ray\"\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\\\/false-alternatives-to-pandas\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/false-alternatives-to-pandas\\\/\",\n\t            \"name\": \"False Alternatives to Pandas | 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\\\/false-alternatives-to-pandas\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/false-alternatives-to-pandas\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/python-blocks.jpg\",\n\t            \"datePublished\": \"2021-10-11T15:50:04+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:20+00:00\",\n\t            \"description\": \"This post discusses several faster alternatives to\u00a0pandas.\",\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\\\/false-alternatives-to-pandas\\\/\"\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\\\/false-alternatives-to-pandas\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/python-blocks.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/08\\\/python-blocks.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 550,\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\\\/d4018570a16fb867f1c08412fc9c64bc\",\n\t            \"name\": \"Andrew Treadway\",\n\t            \"description\": \"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \\\/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\\\/\\\/www.linkedin.com\\\/in\\\/andrew-treadway-a3b19b103\\\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.\",\n\t            \"sameAs\": [\n\t                \"https:\\\/\\\/theautomatic.net\\\/about-me\\\/\"\n\t            ],\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/andrewtreadway\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"False Alternatives to Pandas | IBKR Quant","description":"This post discusses several faster alternatives to\u00a0pandas.","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\/106460\/","og_locale":"en_US","og_type":"article","og_title":"False Alternatives to Pandas | IBKR Quant Blog","og_description":"This post discusses several faster alternatives to\u00a0pandas.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/","og_site_name":"IBKR Campus US","article_published_time":"2021-10-11T15:50:04+00:00","article_modified_time":"2022-11-21T14:48:20+00:00","og_image":[{"width":900,"height":550,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/python-blocks.jpg","type":"image\/jpeg"}],"author":"Andrew Treadway","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andrew Treadway","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/"},"author":{"name":"Andrew Treadway","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc"},"headline":"False Alternatives to Pandas","datePublished":"2021-10-11T15:50:04+00:00","dateModified":"2022-11-21T14:48:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/"},"wordCount":693,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/python-blocks.jpg","keywords":["dask","Data Science","datatable","modin","NumPy","PandaPy","Pandas","Python","ray"],"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\/false-alternatives-to-pandas\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/","name":"False Alternatives to Pandas | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/python-blocks.jpg","datePublished":"2021-10-11T15:50:04+00:00","dateModified":"2022-11-21T14:48:20+00:00","description":"This post discusses several faster alternatives to\u00a0pandas.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/false-alternatives-to-pandas\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/python-blocks.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/python-blocks.jpg","width":900,"height":550,"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\/d4018570a16fb867f1c08412fc9c64bc","name":"Andrew Treadway","description":"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\/\/www.linkedin.com\/in\/andrew-treadway-a3b19b103\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.","sameAs":["https:\/\/theautomatic.net\/about-me\/"],"url":"https:\/\/www.interactivebrokers.com\/campus\/author\/andrewtreadway\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/python-blocks.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/106460","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\/388"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=106460"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/106460\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/99378"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=106460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=106460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=106460"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=106460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}