{"id":12030,"date":"2021-05-28T17:06:18","date_gmt":"2021-05-28T17:06:18","guid":{"rendered":"https:\/\/machinelearningplus.com\/?p=4882"},"modified":"2022-05-16T09:30:19","modified_gmt":"2022-05-16T09:30:19","slug":"vaex","status":"publish","type":"post","link":"https:\/\/machinelearningplus.com\/python\/vaex\/","title":{"rendered":"Vaex &#8211; Faster Pandas Alternate in Python"},"content":{"rendered":"<p><em>Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well.<\/em><\/p>\r\n<p>Pandas is the most widely used python library for dealing with dataframes and processing. The popularity is due to the convenient, easy to understand API it offers along with wide variety of tools. But then, pandas has it shortcomings and a alternative is Vaex. Let&#8217;s find out exactly why!<\/p>\r\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4905\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg\" alt=\"\" width=\"1280\" height=\"719\" srcset=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg 1280w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture-300x169.jpg 300w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture-1024x575.jpg 1024w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture-768x431.jpg 768w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\r\n<h2>1. Why do we need Vaex ?<\/h2>\r\n<p>Pandas is a python library used extensively for reading csv files and processsing dataframes. While pandas works smoothly while dealing with smaller data, it becomes very <strong>slow and inefficient<\/strong> when there are <strong>huge datasets<\/strong>.<\/p>\r\n<p>Nowadays, it has become very common to encounter datasets that are larger than the available RAM on your system. In cases like these, pandas can&#8217;t help you. Also, the complex groupby operations are very slow in pandas. It also does not support memory mapped datasets.<\/p>\r\n<p>What is the solution we need for this ?<\/p>\r\n<p>We need a solution that can resolve all the above problems while still providing a convenient API. That solution is nothing but Vaex !<\/p>\r\n<p>In the upcoming sections, I shall tell you what exactly Vaex is and why is it an alternative to pandas.<\/p>\r\n<p>Related Post: <a href=\"https:\/\/machinelearningplus.com\/python\/modin-speedup-pandas\/\" target=\"_blank\" rel=\"noopener\">How to speed up pandas by changing one line of code using Modin?<\/a><\/p>\r\n<h2>2. What is Vaex ?<\/h2>\r\n<p>Vaex is a python library that is closely similar to Pandas. Vaex is a library especially for <strong>lazy Out-of-Core DataFrames, helps to visualize and explore big tabular datasets.<\/strong> It is a high performance library and can solve many of the shortcomings of pandas. As the API is similar to pandas, users do not face difficulty in shifting. It&#8217;s also integrated with Jupyter which makes it easy.<\/p>\r\n<p>Vaex is capable to calculate statistics such as mean, standard deviation etc, on an <strong>N-dimensional grid up to a billion (109109) objects\/rows per second.<\/strong> It can also help in the Visualization using histograms, density plots and 3d volume rendering, allowing interactive exploration of big data.<\/p>\r\n<p>Vaex achieves this high performance through the combination of memory mapping, a zero memory copy policy, and lazy computations, etc. Don&#8217;t worry if you these terms go over your head. I shall explain each of them in detail with examples.<\/p>\r\n<p>First, install and import the python library as shown below.<\/p>\r\n<pre><code class=\"language-python\"># !pip install vaex\r\n<br \/>import vaex<\/code><code>\r\n<\/code><\/pre>\r\n<h2>3. Vaex uses Memory mapping for large datasets<\/h2>\r\n<p>As we discussed previously, vaex is very useful in case of huge tabular datasets. Let&#8217;s say we have a dataset that is larger than the RAM available. How can you load this using vaex ?<\/p>\r\n<p>Vaex uses Memory mapping to solve this. All the dataset files read into vaex are memory mapped.<\/p>\r\n<p>When you open a memory mapped file with Vaex, you don&#8217;t actually read the data. Vaex will swiftly reads the file metadata (like the location of the data on disk, number of rows, number of columns, column names and types), the file description. So, you can open these files quickly, irrespective of how much RAM you have. But remember that format of memory mappable files are Apache Arrow , HDF5, etc.<\/p>\r\n<p>Let&#8217;s see an example. You can download the dataset I&#8217;m using from <a href=\"https:\/\/www1.nyc.gov\/site\/tlc\/about\/tlc-trip-record-data.page\">here<\/a><\/p>\r\n<pre><code class=\"language-python\"># Reading data from local disk \r\ndf=vaex.open('yellow_tripdata_2020-01.hdf5')\r\n<\/code><\/pre>\r\n<p>But many times, the data available is in the form of CSV files. In these cases, you will have to convert the CSV data into HDF5 format.<\/p>\r\n<p><strong>How to convert a csv file to hdf5 using vaex?<\/strong><\/p>\r\n<p>We have a big csv file here. You can use the <code>vaex.from_csv()<\/code> function to load in csv files. There is a parameter <code>convert<\/code> to decide if you want to convert it into HDF5 or not. In this case, we go for <code>convert=True<\/code>.<\/p>\r\n<p>Vaex will read the CSV in chunks, and convert each chunk to a temporary HDF5 file which is further concatenated into a single HDF5 file.You can decide the size of the individual chunks using <code>chunk_size<\/code> argument.<\/p>\r\n<pre><code class=\"language-python\"># Converting csv into HDF5 and reading dataframe\r\n%time df = vaex.from_csv('yellow_tripdata_2020-01.csv', convert=True)\r\ndf\r\n<\/code><\/pre>\r\n<p><code>Wall time: 1.43 s<\/code><\/p>\r\n<p><code><br \/>\r\n<\/code><\/p>\r\n<p><code><a href=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/car_trip_data.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7066\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/car_trip_data.png\" alt=\"Car Trip Data\" width=\"1756\" height=\"272\" \/><br \/><\/a><\/code>You can see that it took merely 1.43 seconds !  Lets see how much time it would have taken using normal pandas.<\/p>\r\n<pre><code class=\"language-python\">import pandas as pd\r\n%time pandas_df = pd.read_csv('yellow_tripdata_2020-01.csv')\r\n<\/code><code>\r\n\r\nWall time: 2min 34s\r\n<\/code><\/pre>\r\n<div> <\/div>\r\n<p>It took 2min 34 seconds, which is so slow compared to using vaex. I hope you understood how much time memory mapping can save through this comparison.<\/p>\r\n<h2>4. Vaex is lazy : Saves memory<\/h2>\r\n<p>We know that Vaex is very similar to the pandas API. But, there is a fundamental distinction between vaex and pandas.<\/p>\r\n<p>Vaex is lazy.<\/p>\r\n<p>That means, vaex does not actually perform the operation or read through whole data unless necessary (unlike pandas). For example, say you call an expression like: <code>df['passenger_count'].mean<\/code>, the actual computations does not happen. It just notes down what computations it must do. A vaex expression object is created instead, and when printed out it shows some preview values. This significantly saves memory space.<\/p>\r\n<pre><code class=\"language-python\">df['passenger_count'].mean\r\n<\/code><\/pre>\r\n<p>Let&#8217;s have a look at another lazy computation example.<\/p>\r\n<pre><code class=\"language-python\">import numpy as np\r\nnp.sqrt(df.passenger_count**2 + df.trip_distance**2)\r\n<\/code><\/pre>\r\n<pre><code>Expression = sqrt(((passenger_count ** 2) + (trip_distance ** 2)))<br \/>\r\nLength: 6,405,008 dtype: float64 (expression)\r\n---------------------------------------------\r\n      0  1.56205\r\n      1  1.56205\r\n      2  1.16619\r\n      3  1.28062\r\n      4        1\r\n      ...       \r\n6405003      nan\r\n6405004      nan\r\n6405005      nan\r\n6405006      nan\r\n6405007      nan\r\n<\/code><\/pre>\r\n<p>With the expression system, vaex performs calculations only when needed. Also, the data does not need to be local, expressions can be sent over a wire, and statistics can be computed remotely, something that the vaex-server package provides.<\/p>\r\n<p>Let&#8217;s move ahead to other interesting features with vaex. You&#8217;ll be able to observe the &#8220;lazy computation&#8221; is a main foundation behind many of them.<\/p>\r\n<h2>5. Virtual Columns<\/h2>\r\n<p>When you write expressions to create a new column in vaex dataframe, a virtual colum is created.<\/p>\r\n<p>But what is a virtual column?<\/p>\r\n<p>A virtual column behaves just like a regular column but <strong>occupies no memory.<\/strong> Why is this so ?<\/p>\r\n<p>This is because Vaex only remembers the expression the defines them. It does not calculate the values up front like pandas.This saves both memory and time .These columns are lazily evaluated only when it is necessary, keeping memory usage low.<\/p>\r\n<p>Let&#8217;s look at an example.<\/p>\r\n<p>Consider the dataframe <code>df<\/code> we loaded in previous section. we&#8217;ll use the same here. Let&#8217;s write an expression to create a new column <code>new_trip_distance<\/code>as per the below expression. This column will now be a virtual column and no memory alotted. Let&#8217;s record the time taken too.<\/p>\r\n<pre><code class=\"language-python\">%time df['new_trip_distance'] = df['trip_distance'] + 10\r\n<\/code><\/pre>\r\n<pre><code>Wall time: 998 \u00b5s\r\n<\/code><\/pre>\r\n<p>The task was completed in microseconds because there was no need to allot memory. Lets see how much time we saved by performing the same task on the pandas dataframe. Check below code and time.<\/p>\r\n<pre><code class=\"language-python\">%time pandas_df['new_trip_distance'] = pandas_df['trip_distance'] + 10<\/code><code>\r\n\r\n\r\nWall time: 1.34 s\r\n<\/code><\/pre>\r\n<p>It took almost 1500x more time for this!<\/p>\r\n<p>Also, this virtual column <code>new_trip_distnace<\/code> is lazily evaluated on the fly when required.<\/p>\r\n<p><code class=\"language-python\">df<\/code><\/p>\r\n<p><code class=\"language-python\"><a href=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/car_trip_data.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7066\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/car_trip_data.png\" alt=\"Car Trip Data\" width=\"1756\" height=\"272\" \/><br \/><\/a><\/code>I hope you understood how virtual columns work, let&#8217;s move ahead to other operations and features<\/p>\r\n<h2>6. Data cleansing with Vaex<\/h2>\r\n<p>Data cleaning and filtering are the crucial steps that often take up a lot of time in python. For example, let&#8217;s take the same dataframe we used in previous sections. Say you wish to filter out the records whose <code>passenger_count<\/code> is greater than 10. Let&#8217;s try it using the normal pandas and see how much time it takes.<\/p>\r\n<pre><code class=\"language-python\">%time df_filtered=pandas_df[pandas_df['passenger_count']&gt;10]\r\n<\/code><\/pre>\r\n<pre><code>Wall time: 13.6 s\r\n<\/code><\/pre>\r\n<p>You can see that it&#8217;s slow. Let&#8217;s see perform the same task on the vaex dataframe.<\/p>\r\n<pre><code class=\"language-python\">%time df_filtered=df[df['passenger_count']&gt;10]\r\n<\/code><\/pre>\r\n<pre><code>Wall time: 611 ms\r\nParser   : 106 ms\r\n<\/code><\/pre>\r\n<p>Vaex reduced the time taken from 13.6 seconds to micro seconds!<\/p>\r\n<p>Hoe did vaex manage to do that ?<\/p>\r\n<p>It is because of the <strong>zero memory copy policy<\/strong> followed by vaex. This means that filtering a DataFrame costs very little memory and does not copy the data. <code>df_filtered<\/code> has a \u2018view\u2019 on the original data. Even when you filter a 1TB file, just a fraction of the file will be read. This means that when you have large no of missing values, you can drop them or fill them at almost no cost.<\/p>\r\n<pre><code class=\"language-python\">%time df_fillna=df.fillna(value=0, column_names=['passenger_count'])\r\ndf_fillna\r\n<\/code><\/pre>\r\n<p><code>Wall time: 483 ms<\/code><\/p>\r\n<p><code><br \/>\r\n<\/code><\/p>\r\n<p><code><a href=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/car_trip_data_dropna.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-7071\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/car_trip_data_dropna.png\" alt=\"Vaex Fill missing values\" width=\"1348\" height=\"274\" \/><\/a><br \/><\/code>Vaex did the painful task very quickly for us.<\/p>\r\n<h2>7. Statistics performance : Vaex vs Pandas<\/h2>\r\n<p>Vaex is very popular for the high performance it offers when it comes to statistics. While dealing with big tabular datsets ,you will need a alternative to pandas&#8217;s <code>groupby<\/code>. You need a solution that is computationally much faster.So, Vaex alllows you to perform <strong>statistics on a regular N-dimensional grid<\/strong>, which is blazing fast. It has been proven that Vaex can calculate the mean of about a billion row data in just a second !<\/p>\r\n<p>Below is an example of efficient calculation of statistics on N-dimensional grids<\/p>\r\n<pre><code class=\"language-python\"># Every statistic method accepts a binby argument to compute statistics on regular Nd array\r\ndf.mean(df.passenger_count, binby=df.DOLocationID, shape=20)\r\n<\/code><\/pre>\r\n<pre><code>array([1.53489408, 1.49914832, 1.49319968, 1.54545849, 1.49560378,\r\n       1.52010031, 1.50486626, 1.52510748, 1.51555149, 1.55267282,\r\n       1.50574786, 1.5412169 , 1.50043236, 1.48509443, 1.52030571,\r\n       1.53979913, 1.48159731, 1.51295217, 1.51658428, 1.52362767])\r\n<\/code><\/pre>\r\n<p>Now let&#8217;s compare some statistic computations of pandas and vaex.<\/p>\r\n<p>Below, let&#8217;s try and calculate the mean of any column using both pandas and vaex.<\/p>\r\n<pre><code class=\"language-python\">%time df.mean(df.fare_amount)\r\n<\/code><\/pre>\r\n<pre><code>Wall time: 769 ms\r\n\r\n\r\narray(12.69410812)\r\n<\/code><\/pre>\r\n<pre><code class=\"language-python\"><br \/><br \/>%time pandas_df['fare_amount'].mean()\r\n<\/code><\/pre>\r\n<pre><code>Wall time: 1.64 s\r\n\r\n12.69410811978051\r\n<\/code><\/pre>\r\n<p>Vaex was 3X times faster in above case<\/p>\r\n<h2>8. Selections<\/h2>\r\n<p>In the previous section, we saw how strong vaex was in statistics. Let&#8217;s explore another interesting feature offered by vaex : Selections .<\/p>\r\n<p>A Selection is used to define a subset of the data. This helps in two ways. Firstly, it helps to filter te data from the dataframe quick. Apart from this , selections enable you to calculate the statistics for multiple subsets in a single pass over the data. We can do multiple steps in a single line, that too amazingly fast! This application is very useful especially while dealing with DataFrames that don\u2019t fit into memory (Out-of-core).<\/p>\r\n<p>Let&#8217;s understand how to use selections with an example. Say for the previous dataframe of New york taxi data, we need to create subsets based on no of passengers and find the mean fare amount for each subset.Using selection, it can be done in a si gle line as shown below.<\/p>\r\n<pre><code class=\"language-python\">df.mean(df.fare_amount,selection=[df.passenger_count&lt;2,df.passenger_count&gt;2])\r\n<\/code><\/pre>\r\n<pre><code>array([12.38094964, 12.6061761 ])\r\n<\/code><\/pre>\r\n<p>You might have also noticed that it was very quick! Because, vaex does not copy the data like pandas. What does it do then ?Vaex internally keeps track which rows are selected.<\/p>\r\n<p>Apart from this, there is another main use-case of the bin computation and the selections feature : they make visualization faster and easier! Let&#8217;s learn about them in the next section.<\/p>\r\n<h2>9. Fast Visualizations with Vaex<\/h2>\r\n<p>Visualizations are a crucial part to understanding the data we have. It gives a clear result to picture the trends and derive insights. But when you have huge data frame of million rows, making standard scatter plots takes a really long time. Not only that, but the visualizations are illegible and not clear. What is the solution here ?<\/p>\r\n<p>Again, Vaex saves the day!<\/p>\r\n<p>With the help of group aggregations, selections and bins, vaex can compute these visualizations pretty quickly. Most of the visualizations are done in 1 or 2 dimensions. Also and Vaex nicely wraps Matplotlib so that python users are convenient. We shall see some examples of fast visualizations in this section.<\/p>\r\n<h3>1D PLOTS<\/h3>\r\n<p>Consider the dataframe used previously. Let&#8217;s say we need to visualize the values taken by <code>fare_amount<\/code>. You can easily visualize through a 1D plot by making use of vaex&#8217;s <code>plot1d()<\/code> function. There is a parameter <code>limits<\/code> that will show a histogram showing 99.7% of the data as shown below.<\/p>\r\n<pre><code class=\"language-python\">%time df.plot1d(df.fare_amount,limits='99.7%')\r\n<\/code><\/pre>\r\n<pre><code>Wall time: 404 ms\r\n\r\n\r\n\r\n\r\n\r\n[]\r\n<\/code><\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4885\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_62_2-min.png\" alt=\"\" width=\"424\" height=\"280\" srcset=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_62_2-min.png 424w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_62_2-min-300x198.png 300w\" sizes=\"(max-width: 424px) 100vw, 424px\" \/><\/p>\r\n<h3>2D PLOTS<\/h3>\r\n<p>We can also visualize the data in a 2D histogram or heatmap. The <code>DataFrame.plot()<\/code> function is used for this.<br \/>Now, let&#8217;s try and to plot a 2D plot using the same dataframe on NYC taxi data. Check below code.<\/p>\r\n<pre><code class=\"language-python\">df.plot(df.total_amount , df.trip_distance, limits=[-20,20])\r\n<\/code><\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4886\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_65_1-min.png\" alt=\"\" width=\"422\" height=\"280\" srcset=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_65_1-min.png 422w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_65_1-min-300x199.png 300w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/p>\r\n<p>Let us look at a few more examples. For this, I will be using the example dataframe inbuilt in vaex. You can simply load it bu calling <code>vaex.example()<\/code>. Below is the view to this dataframe.<\/p>\r\n<pre><code class=\"language-python\">df_example = vaex.example()\r\ndf_example<br \/><br \/><a href=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/vaex_example_data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7073\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2021\/05\/vaex_example_data.png\" alt=\"Vaex Example Data\" width=\"1553\" height=\"259\" \/><\/a><\/code><\/pre>\r\n<p>Let&#8217;s create a 2D plot using this <code>df_example<\/code>. An amazing feature vaex offers is the <code>what<\/code> parameter of the <code>plot()<\/code> function. You can define the mathematical relation which has to be plotted(shape equals length of what argument). Below is an example of 2D plotting<\/p>\r\n<pre><code class=\"language-python\">df_example.plot(df_example.x, df_example.y, what=vaex.stat.mean(df_example.E)**2, limits='99.7%')\r\n<\/code><\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4887\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_69_1-min.png\" alt=\"\" width=\"417\" height=\"280\" srcset=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_69_1-min.png 417w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_69_1-min-300x201.png 300w\" sizes=\"(max-width: 417px) 100vw, 417px\" \/><\/p>\r\n<p><strong>Selections for plotting<\/strong><\/p>\r\n<p>Previously, we saw that vaex uses selections to speed up filtering. These also help in fast visualizations. Instead of filtering and having 4 different columns like in pandas, you can have 4 (named) selections in your DataFrame. Now, you can calculate statistics in just one single pass over the data. This is significantly faster especially in the cases when your dataset is larger than your RAM. Let&#8217;s see an example below. I have plotted using three selections.<\/p>\r\n<pre><code class=\"language-python\">df_example.plot(df_example.x, df_example.y, what=np.log(vaex.stat.count()+1), limits='99.7%',\r\n        selection=[None, df_example.x &lt; df_example.y, df_example.x &lt; -10]);\r\n<\/code><\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4888\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_71_0-min.png\" alt=\"\" width=\"408\" height=\"280\" srcset=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_71_0-min.png 408w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_71_0-min-300x206.png 300w\" sizes=\"(max-width: 408px) 100vw, 408px\" \/><\/p>\r\n<p>You can see that, by default the graphs are faded on top of each other type. If you want it as separate column , then you can pass the option through the <code>visual<\/code> parameter. This Will plot each selection as a column. See below example<\/p>\r\n<pre><code class=\"language-python\">import numpy as np\r\ndf_example.plot(df_example.x, df_example.y, what=np.log(vaex.stat.count()+1), limits='99.7%',\r\n        selection=[None, df_example.x &lt; df_example.y, df_example.x &lt; -10],visual=dict(column='selection'))\r\n<\/code><\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4889\" src=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_73_1-min.png\" alt=\"\" width=\"428\" height=\"280\" srcset=\"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_73_1-min.png 428w, https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/output_73_1-min-300x196.png 300w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/p>\r\n<pre><code class=\"language-python\"> <\/code><\/pre>\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><\/p>\r\n\r\n","protected":false},"excerpt":{"rendered":"<p>Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well. Pandas is the most widely used python library for dealing with dataframes and processing. The popularity is due to the convenient, easy to [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[21],"tags":[58,22,1949],"class_list":["post-12030","post","type-post","status-publish","format-standard","hentry","category-python","tag-multiprocessing","tag-python","tag-vaex"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Vaex - Faster Pandas Alternate in Python - machinelearningplus<\/title>\n<meta name=\"description\" content=\"Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/localhost:8080\/python\/vaex\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vaex - Faster Pandas Alternate in Python - machinelearningplus\" \/>\n<meta property=\"og:description\" content=\"Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/localhost:8080\/python\/vaex\/\" \/>\n<meta property=\"og:site_name\" content=\"machinelearningplus\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-28T17:06:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-16T09:30:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/localhost:8080\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg\" \/>\n<meta name=\"author\" content=\"Shrivarsheni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shrivarsheni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/\"},\"author\":{\"name\":\"Shrivarsheni\",\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#\\\/schema\\\/person\\\/31d782fda106181b2c88151a1d50a90d\"},\"headline\":\"Vaex &#8211; Faster Pandas Alternate in Python\",\"datePublished\":\"2021-05-28T17:06:18+00:00\",\"dateModified\":\"2022-05-16T09:30:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/\"},\"wordCount\":2009,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Vaes-cover-picture.jpg\",\"keywords\":[\"Multiprocessing\",\"Python\",\"Vaex\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/\",\"url\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/\",\"name\":\"Vaex - Faster Pandas Alternate in Python - machinelearningplus\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Vaes-cover-picture.jpg\",\"datePublished\":\"2021-05-28T17:06:18+00:00\",\"dateModified\":\"2022-05-16T09:30:19+00:00\",\"description\":\"Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/localhost:8080\\\/python\\\/vaex\\\/#primaryimage\",\"url\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Vaes-cover-picture.jpg\",\"contentUrl\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Vaes-cover-picture.jpg\",\"width\":1280,\"height\":719},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#website\",\"url\":\"https:\\\/\\\/machinelearningplus.com\\\/\",\"name\":\"machinelearningplus\",\"description\":\"Learn Data Science (AI \\\/ ML) Online\",\"publisher\":{\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/machinelearningplus.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#organization\",\"name\":\"machinelearningplus\",\"url\":\"https:\\\/\\\/machinelearningplus.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/MachineLearningplus-logo.svg\",\"contentUrl\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/MachineLearningplus-logo.svg\",\"width\":348,\"height\":36,\"caption\":\"machinelearningplus\"},\"image\":{\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/#\\\/schema\\\/person\\\/31d782fda106181b2c88151a1d50a90d\",\"name\":\"Shrivarsheni\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/litespeed\\\/avatar\\\/0d1ccfbd64a15f0b94a69cc383b21358.jpg?ver=1783629629\",\"url\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/litespeed\\\/avatar\\\/0d1ccfbd64a15f0b94a69cc383b21358.jpg?ver=1783629629\",\"contentUrl\":\"https:\\\/\\\/machinelearningplus.com\\\/wp-content\\\/litespeed\\\/avatar\\\/0d1ccfbd64a15f0b94a69cc383b21358.jpg?ver=1783629629\",\"caption\":\"Shrivarsheni\"},\"url\":\"https:\\\/\\\/machinelearningplus.com\\\/author\\\/shrivarsheni\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vaex - Faster Pandas Alternate in Python - machinelearningplus","description":"Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well.","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:\/\/localhost:8080\/python\/vaex\/","og_locale":"en_US","og_type":"article","og_title":"Vaex - Faster Pandas Alternate in Python - machinelearningplus","og_description":"Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well.","og_url":"https:\/\/localhost:8080\/python\/vaex\/","og_site_name":"machinelearningplus","article_published_time":"2021-05-28T17:06:18+00:00","article_modified_time":"2022-05-16T09:30:19+00:00","og_image":[{"url":"https:\/\/localhost:8080\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg","type":"","width":"","height":""}],"author":"Shrivarsheni","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Shrivarsheni","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/localhost:8080\/python\/vaex\/#article","isPartOf":{"@id":"https:\/\/localhost:8080\/python\/vaex\/"},"author":{"name":"Shrivarsheni","@id":"https:\/\/machinelearningplus.com\/#\/schema\/person\/31d782fda106181b2c88151a1d50a90d"},"headline":"Vaex &#8211; Faster Pandas Alternate in Python","datePublished":"2021-05-28T17:06:18+00:00","dateModified":"2022-05-16T09:30:19+00:00","mainEntityOfPage":{"@id":"https:\/\/localhost:8080\/python\/vaex\/"},"wordCount":2009,"commentCount":0,"publisher":{"@id":"https:\/\/machinelearningplus.com\/#organization"},"image":{"@id":"https:\/\/localhost:8080\/python\/vaex\/#primaryimage"},"thumbnailUrl":"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg","keywords":["Multiprocessing","Python","Vaex"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/localhost:8080\/python\/vaex\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/localhost:8080\/python\/vaex\/","url":"https:\/\/localhost:8080\/python\/vaex\/","name":"Vaex - Faster Pandas Alternate in Python - machinelearningplus","isPartOf":{"@id":"https:\/\/machinelearningplus.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/localhost:8080\/python\/vaex\/#primaryimage"},"image":{"@id":"https:\/\/localhost:8080\/python\/vaex\/#primaryimage"},"thumbnailUrl":"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg","datePublished":"2021-05-28T17:06:18+00:00","dateModified":"2022-05-16T09:30:19+00:00","description":"Vaex Python is an alternative to the Pandas library that take less time to do computations on huge data using Out of Core Dataframe. It has fast, interactive visualization capabilities as well.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/localhost:8080\/python\/vaex\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/localhost:8080\/python\/vaex\/#primaryimage","url":"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg","contentUrl":"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2020\/11\/Vaes-cover-picture.jpg","width":1280,"height":719},{"@type":"WebSite","@id":"https:\/\/machinelearningplus.com\/#website","url":"https:\/\/machinelearningplus.com\/","name":"machinelearningplus","description":"Learn Data Science (AI \/ ML) Online","publisher":{"@id":"https:\/\/machinelearningplus.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/machinelearningplus.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/machinelearningplus.com\/#organization","name":"machinelearningplus","url":"https:\/\/machinelearningplus.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/machinelearningplus.com\/#\/schema\/logo\/image\/","url":"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2022\/05\/MachineLearningplus-logo.svg","contentUrl":"https:\/\/machinelearningplus.com\/wp-content\/uploads\/2022\/05\/MachineLearningplus-logo.svg","width":348,"height":36,"caption":"machinelearningplus"},"image":{"@id":"https:\/\/machinelearningplus.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/machinelearningplus.com\/#\/schema\/person\/31d782fda106181b2c88151a1d50a90d","name":"Shrivarsheni","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/machinelearningplus.com\/wp-content\/litespeed\/avatar\/0d1ccfbd64a15f0b94a69cc383b21358.jpg?ver=1783629629","url":"https:\/\/machinelearningplus.com\/wp-content\/litespeed\/avatar\/0d1ccfbd64a15f0b94a69cc383b21358.jpg?ver=1783629629","contentUrl":"https:\/\/machinelearningplus.com\/wp-content\/litespeed\/avatar\/0d1ccfbd64a15f0b94a69cc383b21358.jpg?ver=1783629629","caption":"Shrivarsheni"},"url":"https:\/\/machinelearningplus.com\/author\/shrivarsheni\/"}]}},"_links":{"self":[{"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/posts\/12030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/comments?post=12030"}],"version-history":[{"count":0,"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/posts\/12030\/revisions"}],"wp:attachment":[{"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/media?parent=12030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/categories?post=12030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/machinelearningplus.com\/wp-json\/wp\/v2\/tags?post=12030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}