ArcticDB DataFrame Database

6.12.1 · active · verified Thu Apr 16

ArcticDB is a high-performance, serverless DataFrame database engine designed for the Python Data Science ecosystem. It enables storing, retrieving, and processing Pandas DataFrames at scale, backed by commodity object storage like S3-compatible services, Azure Blob Storage, and local LMDB. It provides a Python API backed by a fast C++ data-processing and compression engine, supporting flexible schemas and bitemporal versioning. The library is actively maintained with frequent patch and minor releases.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize ArcticDB with local LMDB storage, create a library, write a Pandas DataFrame as a 'symbol', and then read it back. The example uses a temporary directory for the LMDB database.

import arcticdb as adb
import pandas as pd
import numpy as np
import os

# Use a temporary LMDB directory for local storage
uri = f"lmdb://{os.environ.get('ARCTICDB_PATH', '/tmp/arcticdb_quickstart')}"
ac = adb.Arctic(uri)

# Create a library
library_name = 'my_test_library'
if not ac.library_exists(library_name):
    ac.create_library(library_name)

lib = ac.get_library(library_name)

# Create a sample DataFrame
df = pd.DataFrame(np.random.randint(0, 100, size=(10, 3)), columns=list('ABC'))
df.index = pd.date_range('2023-01-01', periods=10, freq='D')

# Write the DataFrame
symbol_name = 'my_test_symbol'
lib.write(symbol_name, df)
print(f"DataFrame written to {library_name}/{symbol_name}")

# Read the DataFrame back
read_df = lib.read(symbol_name).data
print("Read DataFrame head:")
print(read_df.head())

# Clean up (optional for temporary storage)
# ac.delete_library(library_name)

view raw JSON →