Search code examples
pythondownloadh2oautomlazure-machine-learning-service

H2O Download CSV in Azure Machine Learning


I am trying to build a ML model in Azure Machine Learning using H2o AutoML and could successfully create the model and do prediction. What I am struggling with is to download the result as csv (ideally to my local PC).

The code I used is :

#Predict on the whole dataset
pred = best_model.predict(data)
data_pred = data.cbind(pred)

# Download as csv
h2o.download_csv(data_pred,'data_pred .csv')

The above code runs without any error & shows '/mnt/azmnt/code/Users/SA/data_pred.csv' as the result message. I assume the csv has been created succesfully.

But I don't know where to locate it. I searched in AzureML datasets but there is none. Appreciate if someone can help me with this. Thanks


Solution

  • H2O Documentation says that:

    h2o.h2o.download_csv(data, filename)

    data : H2OFrame An H2OFrame object to be downloaded.

    filename : str A string indicating the name that the CSV file should be should be saved to.

    Additionally, as you have written in your question /mnt/azmnt/code/Users/SA/data_pred.csv' should be the path.