# v.0.10

{% hint style="danger" %}
This version has been deprecated. If used with the current API version it can produce unexpected behaviour or errors.
{% endhint %}

{% hint style="danger" %}
The package shimoku-api-python is no longer maintained
{% endhint %}

{% hint style="info" %}
To get the new version  :gift::gift::gift:
{% endhint %}

```
pip install --upgrade shimoku-api-python
pip install --upgrade shimoku-components-catalog
```

{% hint style="info" %}
This version brings **Machine Learning** features through our API by the first time!!
{% endhint %}

### Fixes

* For readability, renamed `s.file.*` by `s.io.*`:&#x20;

Before: `s.file.get_dataframe(...)`&#x20;

Now: `s.io.get_dataframe(...)`

* Fixed IO for large dataframes now you can POST and GET dataframes of large sizes without size limit.
* Fix path and subpaths. Now Apps with multiple words can be sorted too: `s.plt.set_apps_orders()` and `s.plt.set_sub_path_orders()`&#x20;
* Fixes in the default look\&feel of different charts and with new features to see data, download image, zoom in and out and change chart type:

  * Heatmap `s.plt.heatmap()`

  <figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FKEW3aXrVrfUUe7KknmXA%2Fimage.png?alt=media&#x26;token=95f81ebc-268b-4dc7-90d9-9c088915094f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FuqAvd5k2O8iqi2IQRDdU%2Fimage.png?alt=media&#x26;token=649e1155-404e-45ea-a436-52a0edade5dc" alt=""><figcaption></figcaption></figure>

* Barchart `s.plt.bar()` and Linechart `s.plt.line()`&#x20;

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FH1ToUZyweiyZqksz1bFe%2Fimage.png?alt=media&#x26;token=0c7d40b7-a75e-49df-9c3f-fbda690cf13d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F06u9IB8CLj2RNKfDyxbP%2Fimage.png?alt=media&#x26;token=1b420ffb-ead0-4b3c-bfbd-664a12a2d142" alt=""><figcaption></figcaption></figure>

### Improvements

* Improvements in the Input Forms look\&feel

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FtXEOSoyYM1JphSZ3dE7b%2Fimage.png?alt=media&#x26;token=ca9f7bc5-258f-4ec7-8993-69d9466bc2e3" alt=""><figcaption></figcaption></figure>

* Easier to initialize the Shimoku Client

```python
import shimoku_api_python as Shimoku

# Still allowed
s = Shimoku.Client(
    config={'access_token': api_key},    
    universe_id=universe_id,    
    environment=environment
)

# Easier
s = Shimoku.Client(
    access_token=api_key,
    universe_id=universe_id,    
    environment=environment
)
```

* Added IO methods for Machine Learning models:

```python
from sklearn import svm
from sklearn import datasets

clf = svm.SVC()
X, y = datasets.load_iris(return_X_y=True)
clf.fit(X, y)

s.io.post_ai_model(
    business_id=business_id,
    app_name='test',
    model_name='model-object-test',
    model=clf,
)

model = s.io.get_ai_model(
    business_id=business_id,
    app_name='test',
    model_name='model-object-test',
)
```

### New <a href="#refactor" id="refactor"></a>

* Added method to clear a whole business (tabula rasa) `shimoku.plt.clear_business()`

Before

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F85IOFVmco9hM1xrBSVYK%2Fimage.png?alt=media&#x26;token=8584990c-ea95-44f8-89c9-2b598e1da5c3" alt=""><figcaption></figcaption></figure>

```
s.plt.clear_business()
```

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F6S9tjxUUHa5ePibhlab9%2Fimage.png?alt=media&#x26;token=fb7db4e4-d609-4309-a7d1-a76125094927" alt=""><figcaption></figcaption></figure>

* Added method to retrieve input forms data

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FrQs24FuUb9RiwcP0Vr2X%2Fimage.png?alt=media&#x26;token=57052a47-004d-475e-8b4a-1225de30eb84" alt=""><figcaption></figcaption></figure>

```
input_data: List[Dict] = s.plt.get_input_forms(menu_path='test/input-form')
```

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FlRtOZuDz8Ov9yXEXkHYP%2Fimage.png?alt=media\&token=7dbf1569-5642-409f-8208-14992ecf2f1e)

### Machine Learning!

* **AI** for Machine Learning features. Now users can use Shimoku's Machine Learning from the SDK just passing a test dataframe and specifying the Model endpoint (ask to Shimoku about what endpoints are available). You can decide whether to add Explainability or not to the predictions

```python
df_pred, df_error = s.ai.predict_categorical(
    df_test=df_test_fail,
    model_endpoint=model_endpoint,
    explain=False,
)
```

Also predictive tables have been added that create a table with the prediction

```python
target_column: str = 'NRO_POL'
column_to_predict: str = 'churn_probability'
menu_path: str = 'AI/Churn'
order: int = 0

s.ai.predictive_table(
   df_test=df_test,
   model_endpoint=model_endpoint,    
   target_column=target_column,
   column_to_predict=column_to_predict,  
   prediction_type='categorical',
   explain=True,  
   menu_path=menu_path, order=order,    
   add_filter_by_column_to_predict=False,
   add_search_by_target_column=True,
   extra_filter_columns=None,
   extra_search_columns=None
)
```
