def loadTableData(df, df_key='index',table="node", \
                   table_key_column = "name",
                   network="current",\
                   namespace="default",\
                   host=cytoscape_host,port=cytoscape_port,verbose=False):

    """
    Loads tables into cytoscape
    
    :param df: a pandas dataframe to load
    :param df_key: key column in df, default="index"
    :param table: target table, default="node"
    :param table_key_column: table key column, default="name"
    :param network: a network name or id, default="current"
    :param host: cytoscape host address, default=cytoscape_host
    :param port: cytoscape port, default=1234
    :param verbose: print more information

    :returns: output of put request
    """
    
    
    
    if type(network) != int:
        networkID=cytoscape("network", "get attribute",\
                      {"network":network,\
                       "namespace":namespace,\
                       "columnList":"SUID"},host=host,port=port)
        networkname=cytoscape("network", "get attribute",\
                      {"network":network,\
                       "namespace":namespace,\
                       "columnList":"name"},host=host,port=port)
        
        network=networkID[0]["SUID"]
        networkname=networkname[0]["name"]
        
    tmp=df.copy()
    if df_key!="index":
        tmp.index=tmp[df_key].tolist()
        tmp=tmp.drop([df_key],axis=1)
            
    tablen=networkname+" default node"
    
    data=[]

 
    for c in tmp.columns.tolist():
        tmpcol=tmp[[c]].dropna()
        for r in tmpcol.index.tolist():
            check=tmpcol[tmpcol.index.isin([r])]
            
            cell={}
            cell[str(table_key_column)]=str(r) # {"name":"p53"}
            if len(check) == 1:
                val=tmpcol.loc[r,c]
            
                if type(val) != str:
                    val=float(val)
            else:
                print(check)
                val=""
            cell[str(c)]=val
            data.append(cell)
    
    
    upload={"key":table_key_column,"dataKey":table_key_column,\
            "data":data}
    
    
    URL="http://"+str(host)+":"+str(port)+"/v1/networks/"+str(network)+"/tables/"+namespace+table  
    if verbose:
        print("'"+URL+"'")
        sys.stdout.flush()
    r = requests.put(url = URL, json = upload)
    if verbose:
        print(r)
    CheckResponse(r)
    res=r.content
    return res