This software provides an easier way to handle structured data by wrapping around pytables/hd5f. Its features simplify managing and analyzing data to make it accessible for all users.
One of the main features of Simpletable is its ability to define a table as a subclass of a SimpleTable, which drastically simplifies the process of accessing structured data. This can be done using the following command:
```python
>>> from simpletable import SimpleTable
>>> import tables
>>> class ATable(SimpleTable):
... x = tables.Float32Col()
... y = tables.Float32Col()
... name = tables.StringCol(16)
```
After defining the table, the next step is to instantiate it with the filename and tablename. This can be done using the following command:
```python
>>> tbl = ATable('test_docs.h5', 'atable1')
```
Once the table has been instantiated, data can be inserted into it using the pytables method. This can be achieved using the following commands:
```python
>>> row = tbl.row
>>> for i in range(50):
... row['x'], row['y'] = i, i * 10
... row['name'] = "name_%i" % i
... row.append()
>>> tbl.flush()
```
Simpletable also features an insert_many() method that allows users to insert an iterable of dicts with keys that match the columns in the table. This is a powerful feature that greatly simplifies the process of inserting data into large tables.
To query the data, Simpletable provides a query() method that serves as an alias of table's readWhere() command. This can be done using the following command:
```python
>>> tbl.query('(x > 4) & (y < 70)') #doctest: +NORMALIZE_WHITESPACE
>>> array([('name_5', 5.0, 50.0), ('name_6', 6.0, 60.0)],
>>> dtype=[('name', '|S16'), ('x', '.
```
Overall, Simpletable is a powerful software library that simplifies the process of accessing structured data, allowing for greater efficiency and ease of use. Its features, such as the ability to define tables, insert data, and query data, make it an indispensable tool for anyone working with structured data.
Version 0.2.2: N/A