Category: Python
Python Lists
What is list in Python? Python Lists are an ordered collection of items within square brackets []. How to create a list in Python We use the square brackets ([]) to create a list. We can create an empty list....
Read Full Article →
Python Strings
The current post covers how to use strings in Python. Specifically, it covers how you can define a string, how to index and slice a string, and how to combine different strings and print them out. Finally, it also covers...
Read Full Article →
Python Dictionaries
What is dictionary in Python? Dictionary is used to store a collection of elements/items. In Python, The other 3 of them in Python are Tuple, Set, and List. Dictionaries are used to store data in a format of key:value. Dictionaries have...
Read Full Article →
How to Save Dataframes as CSV and xlsx Files in Python
This tutorial demonstrates how to save a dataframe as CSV and xlsx files in Python. Part 1: CSV Files We can first write a dictionary, then transform it into a dataframe. After that, we can use to_csv() save it as...
Read Full Article →
Plot Stock Price Time-series Data
This tutorial will show you how to plot stock time-series data using Python. Stock prices vary in different trading days, and thus it would be of interest to the overall trends by plotting it. Needed Packages yfinance — A python library...
Read Full Article →
Use yfinance to Get Stock Prices for Free (3 Steps)
This tutorial will show the basics of using Python package yfinance to get the most recent stock price and store it in a CSV file. First, you need to have a CSV file of ticker and you want to get...
Read Full Article →