<jupyter_start><jupyter_text>Data Upload Notebook|<jupyter_code>import pandas as pd
import syft as sy
import numpy as np
from syft.core.adp.entity import Entity
data = pd.read_csv("../../trade_demo/datasets/it - feb 2021.csv")[0:100]
data.head()
istat = sy.login(email="<EMAIL>",
             password="<PASSWORD>",
             url="http://40.118.226.167/",
             port=80)
# slice data we want to upload for analysis
data_batch = ((np.array(list(data['Trade Value (US$)'])) / 10000)[0:10]).astype(np.int32)

# slice references to real-world entities whose privacy we want to protect
trade_partners = ((list(data['Partner'])))[0:10]
# create "Entity" objects so that the Domain node's Privacy Accountant will know which 
# data subjects occur in which parts of the dataset
entities = list()
for i in range(len(trade_partners)):
    entities.append(Entity(name=trade_partners[i]))
# create dataset
sampled_italy_dataset = sy.Tensor(data_batch)

# annotate public shape (this will go away in a version soon but for now we have to manually annotate this)
sampled_italy_dataset.public_shape = sampled_italy_dataset.shape

# create privacy annotated dataset
sampled_italy_dataset = sampled_italy_dataset.private(0, 3, entity=entities[0]).tag("trade_flow")
istat.load_dataset(
    assets={"feb2020-10": sampled_italy_dataset},
    name="Italy Trade Data - First few rows",
    description="""A collection of reports from iStat's statistics 
                    bureau about how much it thinks it imports and exports from other countries.""",
)
istat.load_dataset(
    assets={"feb2020-10 NO Auto-DP": data_batch},
    name="Italy Trade Data - First few rows",
    description="""A collection of reports from iStat's statistics 
                    bureau about how much it thinks it imports and exports from other countries.""",
)
istat.datasets<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11034115138592751, 'fraction_numerical': 0.026119402985074626, 'mean_word_length': 4.2873239436619714, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '627429', 'license': 'Apache-2.0', 'n_tokens_mistral': 611, 'n_tokens_neox': 557, 'n_words': 178, 'path': 'notebooks/Experimental/Traskinator/Upload Dataset to iStat.ipynb', 'repo_name': 'giraugh/PySyft', 'size': '1887'}