Book Image

Data Processing with Optimus

By : Dr. Argenis Leon, Luis Aguirre
Book Image

Data Processing with Optimus

By: Dr. Argenis Leon, Luis Aguirre

Overview of this book

Optimus is a Python library that works as a unified API for data cleaning, processing, and merging data. It can be used for handling small and big data on your local laptop or on remote clusters using CPUs or GPUs. The book begins by covering the internals of Optimus and how it works in tandem with the existing technologies to serve your data processing needs. You'll then learn how to use Optimus for loading and saving data from text data formats such as CSV and JSON files, exploring binary files such as Excel, and for columnar data processing with Parquet, Avro, and OCR. Next, you'll get to grips with the profiler and its data types - a unique feature of Optimus Dataframe that assists with data quality. You'll see how to use the plots available in Optimus such as histogram, frequency charts, and scatter and box plots, and understand how Optimus lets you connect to libraries such as Plotly and Altair. You'll also delve into advanced applications such as feature engineering, machine learning, cross-validation, and natural language processing functions and explore the advancements in Optimus. Finally, you'll learn how to create data cleaning and transformation functions and add a hypothetical new data processing engine with Optimus. By the end of this book, you'll be able to improve your data science workflow with Optimus easily.
Table of Contents (16 chapters)
1
Section 1: Getting Started with Optimus
4
Section 2: Optimus – Transform and Rollout
10
Section 3: Advanced Features of Optimus

Adding a new engine

The ultimate thing you can do with Optimus is expand its functionality to make it do whatever you want. In this section, we will explore how Optimus is structured so that can know where to go to expand or add specific functionality. To make this a complete exercise and understand where every piece goes, we'll add a completely new engine, such as pandas, Dask, cuDF, or Dask-cuDF. Here, we'll be adding Vaex as the engine of choice.

Cloning the repository from GitHub

To start, let's clone a clean Optimus repository from GitHub. Be aware that the file path and Optimus's internal structure may change a little in upcoming releases:

  1. First, let's clone the Optimus repository. From the CLI, enter git clone https://github.com/ironmussa/Optimus.git.

    The easiest way to test the new code in Optimus is by using a couple of handy comments from a Jupyter Notebook.

    In the first cell, add the following:

    %load_ext autoreload
    %autoreload 2

    This will...