Download tablenet.py - Version 1.02 (29. June 2015)
- Python 2.7
- .NET4 Framework
- .NET integration module pythonnet must be installed ("pip install pythonnet" in command line)
Unzip the downloaded zip file. You will find two files in the folder: tablenet.py (Python module) and FinaquantProtos.dll (.NET assembly with the class MatrixTable that contain table-valued functions). You can now run tablenet.py in Python to test the module.
As of today (26. June 2015), the first version of the module tablenet.py includes only a small subset of the table functions available in Finaquant Protos. I will continue to work on the module to extend the features, and publish the latest release regularly here.
This development process may continue for several months, even years; I will append the release history here. Please let me know if you have any questions, or improvement suggestions.
Module information for the first release:
Table-Valued Functions in Python. Version: 1.01 (26. June 2015)
Python (2.7) module with the Table class, which is a wrapper for the MatrixTable
class of the .NET library 'Finaquant Protos' with table-valued functions.
This module (tablenet.py) requires .NET library 'Finaquant Protos' for execution.
The .NET integration module pythonnet must be installed
('pip install pythonnet' in command line) before running or importing this module.
Author: Tunc Ali Kutukcuoglu, tuncalik (at) finaquant.com
Example test code from the module:
Converting a pandas DataFrame to a Table (MatrixTable)
Converting a Table to a to a DataFrame
As you see above, a DataFrame can easily be converted to a Table (MatrixTable), and vice versa. This is practical, because DataFrame class of pandas doesn't have all the table functions included in Table, like table arithmetic, filtering with a condition table, subtable transformers, function routers, filtering cells and cell lists, and so on. On the other hand, Table class doesn't have all the table functions included in DataFrame, especially the more SQL-like ones (select, update etc.).
More examples with Table class: