Metadata-Version: 2.1
Name: polymatica-api
Version: 0.0.8
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

This is a simple example of getting data from a server Polymatica Platform

```python
from polymatica_api import PolymaticaAPI
from polymatica_api.types import DataOptionMethod
import pandas as pd


p = PolymaticaAPI('{SERVER_URL}', 'Token {TOKEN}')
response = p.get_data([
    p.from_dataset('world_population.csv').
    method(DataOptionMethod.Aggregate).
    group("Country/Territory").
    sum(
        '2000 Population', 
        '2010 Population', 
        '2015 Population',
        '2020 Population',
        '2022 Population',
    )
])

data = response.get('default')
frame = pd.DataFrame(data.rows)
frame.rename(columns=data.column_map, inplace=True)
print(frame)
```
