Skip to content
Snippets Groups Projects
Commit cd8eb730 authored by Marco Biasini's avatar Marco Biasini
Browse files

Add table class

parent ea2de263
Branches
Tags
No related merge requests found
......@@ -48,4 +48,5 @@ RelWithDebInfo
Debug
*.cxx_parameters
/deployment/win/create_archive.bat
/install_manifest.txt
\ No newline at end of file
/install_manifest.txt
*_out.csv
\ No newline at end of file
......@@ -7,4 +7,4 @@ set(OST_BASE_PYMOD_SOURCES
pymod(NAME base OUTPUT_DIR ost
CPP ${OST_BASE_PYMOD_SOURCES}
PY __init__.py settings.py stutil.py)
PY __init__.py settings.py stutil.py table.py)
This diff is collapsed.
......@@ -3,6 +3,7 @@ set(OST_BASE_UNIT_TESTS
test_string_ref.cc
test_pod_vector.cc
test_stutil.py
test_table.py
tests.cc
)
......
This diff is collapsed.
:mod:`~ost.table` - Working with tabular data
================================================================================
.. module:: ost.table
:synopsis: Working with tabular data
This module defines the table class that provides convenient functionality to work with tabular data. It features functions to calculate statistical moments, e.g. mean, standard deviations as well as functionality to plot the data using matplotlib.
Basic Usage
--------------------------------------------------------------------------------
.. code-block:: python
from ost.table import *
# create table with two columns, x and y both of float type
tab=Table(['x', 'y'], 'ff')
for x in range(1000):
tab.AddRow([x, x**2])
# create a plot
plt=tab.Plot('x', 'y')
# save resulting plot to png file
plt.savefig('x-vs-y.png')
The Table class
--------------------------------------------------------------------------------
.. autoclass:: ost.table.Table
:members:
:undoc-members: SUPPORTED_TYPES
.. autofunction:: ost.table.Merge
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment