Day: March 11, 2021

Write a program to predict Bank Customer Churn using GBM with MCCV in Python

(End-to-End Jupyter Notebook for Citizen Data Scientist & Business Analyst) Write a program to predict Bank Customer Churn using GBM with MCCV in Python. In this end-to-end applied machine learning and data science notebook, the reader will learn: How to predict Bank Customer Churn using GBM with MCCV in Python.  Download Write a program …

Write a program to predict Bank Customer Churn using GBM with GSCV in Python

(End-to-End Jupyter Notebook for Citizen Data Scientist & Business Analyst) Write a program to predict Bank Customer Churn using GBM with GSCV in Python. In this end-to-end applied machine learning and data science notebook, the reader will learn: How to predict Bank Customer Churn using GBM with GSCV in Python.  Download Write a program …

Python Example – Write a Python program for binary search

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program for binary search. Binary Search : In computer science, a binary search or half-interval search algorithm finds the position of a target value within a sorted array. The binary search algorithm can be classified as a dichotomies divide-and-conquer search algorithm and …

Python Example – Write a Python program to get the unique enumeration values

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to get the unique enumeration values.   Sample Solution: Python Code: import enum class Countries(enum.Enum): Afghanistan = 93 Albania = 355 Algeria = 213 Andorra = 376 Angola = 244 India = 355 USA = 213 for result in Countries: print(‘{:15} …

Python Example – Write a Python program to count the number of students of individual class

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to count the number of students of individual class.   Sample Solution: Python Code: from collections import Counter classes = ( (‘V’, 1), (‘VI’, 1), (‘V’, 2), (‘VI’, 2), (‘VI’, 3), (‘VII’, 1), ) students = Counter(class_name for class_name, no_students in …

Python Example – Write a Python program to count the most common words in a dictionary

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to count the most common words in a dictionary.   Sample Solution: Python Code: words = [ ‘red’, ‘green’, ‘black’, ‘pink’, ‘black’, ‘white’, ‘black’, ‘eyes’, ‘white’, ‘black’, ‘orange’, ‘pink’, ‘pink’, ‘red’, ‘red’, ‘white’, ‘orange’, ‘white’, “black”, ‘pink’, ‘green’, ‘green’, ‘pink’, ‘green’, …

Python Example – Write a Python program to get all values from an enum class

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to get all values from an enum class.   Sample Solution: Python Code: from enum import IntEnum class Country(IntEnum): Afghanistan = 93 Albania = 355 Algeria = 213 Andorra = 376 Angola = 244 Antarctica = 672 country_code_list = list(map(int, Country)) …

Python Example – Write a Python program to display all the member name of an enum class ordered by their values.

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to display all the member name of an enum class ordered by their values.   Sample Solution: Python Code: import enum class Country(enum.IntEnum): Afghanistan = 93 Albania = 355 Algeria = 213 Andorra = 376 Angola = 244 Antarctica = 672 …

Python Example – Write a Python program to iterate over an enum class and display individual member and their value.

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to iterate over an enum class and display individual member and their value.   Sample Solution: Python Code: from enum import Enum class Country(Enum): Afghanistan = 93 Albania = 355 Algeria = 213 Andorra = 376 Angola = 244 Antarctica = …

Python Example – Write a Python program to create an Enum object and display a member name and value

(Python Example for Citizen Data Scientist & Business Analyst)   Write a Python program to create an Enum object and display a member name and value.   Sample Solution: Python Code: from enum import Enum class Country(Enum): Afghanistan = 93 Albania = 355 Algeria = 213 Andorra = 376 Angola = 244 Antarctica = 672 …