Tag Archives: python

Python – How to install mlxtend in Anaconda

Add Channel and Install Mlxtend using Conda Install

In this post, you will quickly learn about how to install mlxtend python package while you are working with Anaconda Jupyter Notebook. Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks. This library is created by Dr. Sebastian Raschka, an Assistant Professor of Statistics at the University of Wisconsin-Madison focusing on deep learning and machine learning research. Here is the instruction for installing within your Anaconda.  Add a channel namely conda-forge by clicking on Channels button and then Add button. Open a command prompt and execute the following command: conda install mlxtend –channel Conda-forge Once installed, launch a Jupyter Notebook and try importing the following. This should work …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , .

Python DataFrame – Assign New Labels to Columns

Python Dataframe Columns - Labels assigned new value

In this post, you will get a code sample related to how to assign new labels to columns in python programming while training machine learning models.  This is going to be very helpful when working with classification machine learning problem. Many a time the labels for response or dependent variable are in text format and all one wants is to assign a number such as 0, 1, 2 etc instead of text labels. Beginner-level data scientists will find this code very handy. We will look at the code for the dataset as represented in the diagram below: In the above code, you will see that class labels are named as very_low, Low, High, Middle …

Continue reading

Posted in AI, Data Science, Machine Learning, News. Tagged with , , .

How to Print Unique Values in Pandas Dataframe Columns

print unique column values in Pandas dataframe

A quick post representing code sample on how to print unique values in Dataframe columns in Pandas. Here is a data frame comprising of oil prices on different dates which column such as year comprising of repeated/duplicate value of years. In the above data frame, the requirement is to print the unique value of year column. Here is the code for same. Note the method unique()

Posted in AI, Data Science, Machine Learning, News, Python. Tagged with , , .

Python Quick Coding Tutorials for Experienced Developers

python tutorials for experienced developers

Learning Python has taken centerstage for many developers as Python is one of the key language for working in the field of data science/machine learning. If you are an experienced developer, this post would help you quickly get started with Python programming. In this post, you will quickly learn some of the following in relation to Python programming: Data types Input/output operations Defining functions Conditional expressions Looping constructs String functions Defining Module Defining Classes Exception handling Python Programming Concepts Data types: Python interprets and declares variables when they are equated to a value. The following represents how variables are casted to specific data types. float(variable): Casts variable to float int(variable): …

Continue reading

Posted in Python, Tutorials. Tagged with .