In Python, dictionaries are powerful resources that are capable of storing a lot of information. I. this post, I will show you how to create a dictionary with multiple elements and how to delete one of those items.

Let’s name our dictionary people and add our elements.

Image for post
Image for post

We have three keys: Steve, Tim, and Frank. Each of these keys has two values, age and last name. If we want to pull our first item, we will do the following:

If you have read my other posts about stock information retrieval, then you’ll be happy to know there is a MUCH simpler way to get the information you want in fewer lines of code. This code is easier to read and takes less time to process. If you have not read my other posts, then you’re in luck because you get to skip to the easy version!

In my previous method to retrieve information, I created a web scraper that would take all the information from Yahoo Finance’s web page. Although it was not the easiest thing to make, it worked. I initially looked for a Yahoo Finance API but could not find it, so I created the web scraper. …

Creating a Linear Regression model in python requires imports from the Sci-kit Learn library. It is useful to assess the relationship between two variables.

This example will use heart disease data found on Kaggle's website.

Image for post
Image for post

Completing basic math operations is easier than you may think. Operations like addition, subtraction, multiplication, and division are useful for statistics and completing other tasks.

Addition

Image for post
Image for post

Creating a dictionary in python is a useful tool that can be applied to machine learning hyper tuning and grid searching. In this blog, I’ll go over how to create a dictionary, go through it, and add items to it.

First, start by creating a variable name for your dictionary. In my example, I called it dict1. You cannot use the name dict because that name is a built-in python function. Dictionaries take squiggly brackets, unlike lists or tuples.

As seen below, Groceries is my first item in the dictionary called a key. It is composed of three elements called values: apple, orange, and pear. I also have a dictionary called Cars. …

Defining functions is a great way to demonstrate your coding ability. It shows you know how to create something that doesn't need to be changed every time to run. I mean that you do not have to change numbers or variables to get the outcome you desire. This could be charting graphs without changing the title or axes, but you programmed the graph to update the title and axes accordingly. Another example is adding all the numbers together up to a certain number. In this post, I’ll show you how to do the latter.

If I wanted to add all the numbers from zero to four, most people wouldn't need python or a calculator to do that. However, what if I wanted to add every number from zero to three thousand? It is possible to do it by hand or by the calculator, but it would take quite a long time. Python is faster, and when we create a function, we can finish this task much quicker. …

Creating a list and being able to select items through the list is very important. Selecting items is easy and simple, so let's get started.

I have my example list here.

Image for post
Image for post

If I want to pull out the first item, apple, I call my variable, list1, use square brackets, and enter a zero.

Nested for loops can get tricky because of the different operations in each statement. They can be difficult to understand, but once you understand what is happening, it becomes evident how your computer is running the loop.

Image for post
Image for post

Let’s start with one for loop.

In this example, we will add numbers together. I start with my list of numbers 0, 1, 2, 3, and 4. The range function includes the first number in the argument, but the second number is excluded.

Ichimoku Kinko Hyo, or more commonly referred to as Ichimoku, is a trading strategy investors use for opportune times to buy and sell their position. This strategy was developed in the 1930s by a Japanese journalist and is still used today. Looking at the graph can be daunting at first because of the number of lines and colors, but after learning about each line and what they mean, it proves to be very useful.

As with any trading strategy, this does not guarantee success, and this is my own analysis. I have not used the strategy to make any profits, investments and am not advising you to do so. …

Seaborn is a great library to use for your data visualizations. In my opinion, it is easier to use than matplot lib and has better graphics. Seaborn has a wide variety of graphs to use like histograms, scatter plots, and line graphs. The library has a wide variety of visuals that are fun to explore and can make your presentation a success. I would recommend using this over matplot lib because of these reasons.

Here are a few examples of their graphs:

Image for post
Image for post
Boxplot

About

Joseph Hart

Data Scientist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store