https://github.com/brentp/fastbit-python
pythonic access to fastbit
https://github.com/brentp/fastbit-python
Last synced: 4 months ago
JSON representation
pythonic access to fastbit
- Host: GitHub
- URL: https://github.com/brentp/fastbit-python
- Owner: brentp
- Created: 2011-03-17T21:40:37.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T11:42:56.000Z (almost 7 years ago)
- Last Synced: 2025-02-02T04:41:12.499Z (4 months ago)
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 26
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
add types support of query:
ushort, uint, ulong, int ,long ,float, doubleFastBit-Python
==============A pythonic interface to the `FastBit`_ library which
does compressed bitmask indexes on disk-based, column-oriented
data.This wrapper is very much in progress. (contributors welcome).
It is started from earlier work (http://code.google.com/p/pyfastbit/) by myself
and Jose Nazario.See tinker.py for current usage.
Installing FastBit
==================install fastbit c/c++ library::
wget https://codeforge.lbl.gov/frs/download.php/231/fastbit-ibis1.2.2.tar.gz
tar xzf fastbit-ibis1.2.2.tar.gz
cd fastbit-ibis1.2.2/
./configure && make -j4 && sudo make installand to install pyfastbit::
git clone
sudo python setup.py installUsage
=====::
>>> from fastbit import FastBit
>>> import numpy as np
>>> f = FastBit('datadir.test')
>>> f.add_array(np.arange(100), 'a')
>>> f.add_array(np.arange(100, dtype='i'), 'b')
>>> q = f.query('b > 97', 'b')
>>> q.b
[98, 99]
>>> import shutil; shutil.rmtree('datadir.test').. _`FastBit`: https://sdm.lbl.gov/fastbit/