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 = http://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data ![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 https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-execute-python-scripts **This experiment** https://gallery.cortanaintelligence.com/Experiment/Python-Col-name <br><br> ---------- > This ML experiment is for [Microsoft Azure Machine Learning Course][101].<br> For the complete experiment list [Click here][102].<br> Laploy | laploy@gmail.com | 084 007 5544 | [www.laploy.com][103]<br> ![enter image description here][11] ---------- [101]: https://notebooks.azure.com/laploy/libraries/loyml/html/00001%20Sessions%20summary.ipynb [102]: https://gallery.cortanaintelligence.com/Home/Author?authorId=81E333F747E3429B55A3445E6714C36F60B397C13B4D0B07F34DEF1421F64D73 [103]: http://laploy.com [1]: https://raw.githubusercontent.com/laploy/mli/master//11400-002.png [2]: https://raw.githubusercontent.com/laploy/mli/master//11400-003.png [3]: https://raw.githubusercontent.com/laploy/mli/master//11400-004.png [4]: https://raw.githubusercontent.com/laploy/mli/master//11400-005.png [5]: https://raw.githubusercontent.com/laploy/mli/master//11400-006.png [6]: https://raw.githubusercontent.com/laploy/mli/master//11400-001.png [7]: https://raw.githubusercontent.com/laploy/mli/master//11400-007.png [8]: https://raw.githubusercontent.com/laploy/mli/master//11400-008.png [9]: https://raw.githubusercontent.com/laploy/mli/master//11400-009.png [10]: https://raw.githubusercontent.com/laploy/mli/master//11400-010.png [11]: https://raw.githubusercontent.com/laploy/mli/master//loy-small.jpg