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 how to add a variable to a string.

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 the following few characteristics. (1) Dictionaries are ordered, as of Python Version 3.7. In Python … Read more

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 a CSV. brands models 0 Tesla Model 3 1 Toyota RAV4 The CSV file is … Read more

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 that offers a threaded and Pythonic way to download market data from Yahoo! Finance. matplotlib — A … Read more