Python Col name

June 22, 2017
Add column name to data set using Python script
**In this session:** Create Adult Col name python experiment - Insert Import data module to experiment’s canvas - Add python module to canvas - Enter Python script to the module - Run and debug script - Make a copy of Adult Income experiment - Add Python script to Experiment - More information **Final result experiment** ![enter image description here][1] **Create Adult Col name python experiment** - Create new Blank Experiment - Name = Python col name ![enter image description here][2] **Insert Import data module to experiment’s canvas** - Click Data Input and Output - Drag & drop Import Data - Data source = ![enter image description here][3] ![enter image description here][4] ![enter image description here][5] **Add python module to canvas** - Add Execute Python Script to canvas - Connect Import Data module to Execute Python Script ![enter image description here][6] **Enter Python script to the module** - Add Python script to Execute Python Script module - Press check #import pandas as pd def azureml_main(dataframe1 = None, dataframe2 = None): dataframe1.columns = [ 'age', 'workclass', 'fnlwgt', 'education', 'education-num', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'capital-gain', 'capital-loss', 'hours-per-week', 'native-country', 'income' ] return dataframe1, ![enter image description here][7] **Run and debug script** - Run Experiment - Debugging Python script - View Error Log - Edit script - Re-Run Experiment - Visualize the result - Save the experiment ![enter image description here][8] **Make a copy of Adult Income experiment** - Open experiment Adult Income - Save as Adult Income python ![enter image description here][9] **Add Python script to Experiment** - Add module Execute Python Script - Remove connection between Import Data & Spit Data - Connect Import Data to Execute Python Script module - Enter Script - Run and debug - Visualize - Save experiment ![enter image description here][10] **More information** Execute Python machine learning scripts in Azure Machine Learning Studio **This experiment** <br><br> ---------- > This ML experiment is for [Microsoft Azure Machine Learning Course][101].<br> For the complete experiment list [Click here][102].<br> Laploy | | 084 007 5544 | [][103]<br> ![enter image description here][11] ---------- [101]: [102]: [103]: [1]: [2]: [3]: [4]: [5]: [6]: [7]: [8]: [9]: [10]: [11]: