Caesar Cipher in Python

Caesar Cipher is a simple encryption and obfuscation method. It’s a straightforward substitution cipher that replaces each plain text character with the obfuscated character obtained by shifting the plain text character a fixed number of positions in the alphabet. What is Cryptography? Before we introduce our first cryptographic algorithm, Caesar’s cipher, let’s first introduce cryptography … Read more

How to Access a Dictionary Key by Index

Problem Formulation and Solution Overview In this article, you’ll learn how to access a Dictionary key by index in Python. To make it more fun, we have the following running scenario: Rivers Clothing has a list of Employees. They would like to find the name of their youngest staff member. They know this person is … Read more

How to Count Vowels in a String

Problem Formulation and Solution Overview In this article, you’ll learn how to count the number of vowels in a string. To make it more fun, we have the following running scenario: In Canada, we have a province called Saskatchewan. This province has a large amount of flat land. In this article, we reference their local … Read more

How to Find Max Value in Dictionary

Problem Formulation and Solution Overview In this article, you’ll learn how to find the maximum value in a Python dictionary. To make it more fun, we have the following running scenario: You are in the market for a car and have narrowed the search to a few possibilities. Your final choice will be based on … Read more

How to Suppress Scientific Notation in Python

[toc] Summary: Use the string literal syntax f”{number:.nf}” to suppress the scientific notation of a number to its floating-point representation. Problem Formulation: How will you suppress a number represented in scientific notation by default to a floating-point value? Note: Generally, Python represents huge floating-point numbers or very small floating-point numbers in their scientific form. Scientific … Read more

Pandas DataFrame Methods [Cheat Sheet]

The following table provides you with an overview of Pandas DataFrame methods — and where you can learn more about the specific method. ALL LINKS OPEN IN A NEW TAB! df.abs() Return a Series/DataFrame with absolute numeric value of each element. df.add_prefix() Prefix labels with string prefix. df.add_suffix() Suffix labels with string suffix. df.align() Align … Read more

Pandas DataFrame to_coo() Method

Preparation Before any data manipulation can occur, four (4) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The NumPy library supports multi-dimensional arrays and matrices in addition to a collection of mathematical functions. The pandas_gbq allows access to Google Big Query (GBQ) The google.auth authentication. To install these libraries, navigate … Read more

Pandas DataFrame to_gbq() Method

This article focuses on the serialization and conversion methods of a Python DataFrame: to_gbq(), to_coo(). Let’s get started! Preparation Before any data manipulation can occur, four (4) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The NumPy library supports multi-dimensional arrays and matrices in addition to a collection of mathematical … Read more

Pandas DataFrame to_string() Method

Preparation Before any data manipulation can occur, three (3) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The Pyarrow library allows writing/reading access to/from a parquet file. The Openpyxl library allows styling/writing/reading to/from an Excel file. To install these libraries, navigate to an IDE terminal. At the command prompt ($), … Read more

Pandas DataFrame to_feather() Method

Preparation Before any data manipulation can occur, three (3) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The Pyarrow library allows writing/reading access to/from a parquet file. The Openpyxl library allows styling/writing/reading to/from an Excel file. To install these libraries, navigate to an IDE terminal. At the command prompt ($), … Read more