Following is the code used to create the voltage, current and power factor defect for the article which can be found here: Part V: Machine Learning (ML) With Raw Electric Motor Data | THE RAM REVIEW
*Note: The code in this article is for demonstration purposes only and is not meant for real-world applications of this type which are far more complex. Use of this information for machine learning or other applications is for providing rudimentary understanding of machine learning methods and no warranty is implied.