class_docstr: Contais some helpful set of methods and attributes for tests execution.
class_docstr_tok: ["Contais","some","helpful","set","of","methods","and","attributes","for","tests","execution","."]
docstr: Upload pandas df as csv file.
docstr_tok: ["Upload","pandas","df","as","csv","file","."]
code: def upload_ds(df, name):
      """Upload pandas df as csv file."""
      with tempfile.NamedTemporaryFile(
          mode="w+", newline="", delete=False
      ) as f:
          df.to_csv(f, index=False)
          f.flush()
          url = f"{HTTP_API_ROOT}/files/{name}"
          data = {"file": (f.name, f, "text/csv")}
          res = requests.put(url, files=data)
          res.raise_for_status()
  
imports: import os
  import time
  import tempfile
  import json
  from pathlib import Path
  import docker
  import pandas
  import requests
  import pytest
  from .conftest import docker_inet_ip, TEMP_DIR
label_desc: Use image node_id 4 for calling the BaseStuff obj's underlying member method code with example usage: obj.upload_ds(df, name) without return types