Python – Introduction

Excel to Python Example – How to count number of cells greater than a particular number

  Excel to Python Example – How to count number of cells greater than a particular number   In this Learn by Coding example, we will learn how to count number of cells (in excel) greater than a particular number. This example is useful for beginners who has excel background and wish to learn Python …

How to get odd and even numbers from a list in Python

  How to get odd and even numbers from a list in Python In this coding example, we learn how to find odd and even numbers from a list using Python program. Code Example:   Outcomes:   Python Example for Beginners Special 95% discount 2000+ Applied Machine Learning & Data Science Recipes Portfolio Projects for …

How to implement Random Forest Algorithm with Python and Scikit-Learn

  How to implement Random Forest Algorithm with Python and Scikit-Learn Random forest is a type of supervised machine learning algorithm based on ensemble learning. Ensemble learning is a type of learning where you join different types of algorithms or same algorithm multiple times to form a more powerful prediction model. The random forest algorithm combines multiple algorithm …

How to Read a File Line-by-Line in Python

Google –> SETScholars. How to Read a File Line-by-Line in Python Introduction Over the course of my working life I have had the opportunity to use many programming concepts and technologies to do countless things. Some of these things involve relatively low-value fruits of my labor, such as automating the error prone or mundane like …

What is Command Line Arguments in Python

What is Command Line Arguments in Python Overview With Python being such a popular programming language, as well as having support for most operating systems, it’s become widely used to create command line tools for many purposes. These tools can range from simple CLI apps to those that are more complex, like AWS’ awscli tool. Complex tools …

Reading and Writing CSV Files in Python

Reading and Writing CSV Files in Python What is a CSV File? A CSV (Comma Separated Values) file is a file that uses a certain formatting for storing data. This file format organizes information, containing one record per line, with each field (column) separated by a delimiter. The delimiter most commonly used is usually a …

Learn Python By Example – Data Structure Basics

Data Structure Basics Lists “A list is a data structure that holds an ordered collection of items i.e. you can store a sequence of items in a list.” – A Byte Of Python Lists are mutable. /* Create a list of countries, then print the results */ allies = [‘USA’,’UK’,’France’,’New Zealand’, ‘Australia’,’Canada’,’Poland’]; allies [‘USA’, ‘UK’, …

Pandas Example – Write a Pandas program to convert given series into a dataframe with its index as another column on the dataframe

(Python Example for Beginners)   Write a Pandas program to convert given series into a dataframe with its index as another column on the dataframe.   Sample Solution : Python Code : import numpy as np import pandas as pd char_list = list(‘ABCDEFGHIJKLMNOP’) num_arra = np.arange(8) num_dict = dict(zip(char_list, num_arra)) num_ser = pd.Series(num_dict) df = num_ser.to_frame().reset_index() …

Python Example – Write a NumPy program to compute the condition number of a given matrix

(Python Example for Beginners)   Write a NumPy program to compute the condition number of a given matrix. From Wikipedia: In the field of numerical analysis, the condition number of a function with respect to an argument measures how much the output value of the function can change for a small change in the input …

Python Basics for Beginners – Python | Basic Syntax

  Python Basics for Beginners – Python | Basic Syntax The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages. First Python Program Let us execute programs in different modes of programming. Interactive Mode Programming Type the following text at the Python prompt and press …