A guide to help implement various Pandas functions on stock data.

When dealing with time-series data, it has a different format and usually has a DateTime index and its corresponding value. Some examples of time-series data can be stock market data, count of sunspots, or temperature reading of the atmosphere.

In this article, I will take you through the different Pandas methods that can be used with time-series stock data.

Image for post
Image for post
Photo by Chris Liverani on Unsplash

Understanding datetime index

When dealing with time-series data, date and time information is a must and is always given. But the date and time information is not always in columns separated. There is a possibility that it is actually the index of a dataset (datetime index). …


A guide to understanding how to procure data for doing financial analysis using Python.

Image for post
Image for post
Photo by Jason Briscoe on Unsplash

When you plan to work on using Python for finance, a particular form of data is needed. This data should be concerned with financial values. In this article, I will introduce two methods to get financial data using the Python language.

1) Method 1: Pandas — datareader

The first method that I have mentioned deals with getting data using Pandas-datareader. Pandas is an open-source Python library that is used for performing data analysis and is used as a manipulation tool. Check out this article mentioned below to know about Pandas in detail.

So the subpackage Pandas-datareader helps the user to create dataframes from the internet sources available. It allows one to connect to many sources like Yahoo Finance, World Bank, Google Analytics, St.Louis FED (FRED) and Kenneth French’s data library. …


A guide to understanding how to gain insights from time-series data by plotting visualizations using Pandas.

Time series data is a sequence of data points that are indexed in time order. These data points are measured at different points of time and are used to track change over a period of time.

In this article, I will take you through the different Pandas functions to visualize time series data.

To know about Pandas basic functions, check out my articles here and here.

Importing packages

The necessary packages to perform the visualizations are imported.

>>> import pandas as pd
>>> import matplotlib.pyplot as plt
>>> %matplotlib inline

Importing data

The time-series data used is McDonalds data. It has 3 columns: Date, adjusted close and adjusted volume. We will name the rows according to the date and have the other 2 as columns. …


A guide to understanding and create geographical plots for data analysis.

What is geographical plotting?

Geographical plotting is used for world maps and also for different states of the countries. It is useful when map-based data has to be analyzed and draw insights. An application area of this is for visualization export and import data of goods.

What is used to create geographical plots?

Plotly will be used for plotting. The reason being that it creates interactive plots.

To know about Plotly in detail, check my article here.

How to import packages?

The plotly package is imported. Along with this few modules from plotly offline are also imported since we are using in the offline mode. The Pandas package is imported for dealing with dataframes.

>>> import pandas as pd
>>> import plotly as py
>>> from plotly.offline import…


A guide to help analyze data through interactive visualizations using Plotly and Cufflinks.

What are Plotly and cufflinks?

Plotly is a library that is used for creating interactive visualizations o the data. Cufflinks, on the other hand, helps to connect Plotly with Pandas library.

To know more about Pandas, check my article here.

How to install Plotly and Cufflinks?

pip install plotly

pip install cufflinks

How to import packages?

The basic packages like numpy and pandas will be imported along with plotly and cufflinks. We will also import few packages of the plotly offline since we are doing it in the offline mode.

>>> import pandas as pd
>>> import numpy as np
>>> import plotly
>>> import cufflinks as cf
>>> from plotly.offline import download_plotlyjs,init_notebook_mode,plot,iplot

To make sure that the plots are created inside the notebook, write the below code. …


This article will help you to use in-built Pandas methods for visualizing data and drawing insights.

How to import the packages?

Numpy and Pandas package is imported. Along with this the magic function ‘%matplotlib inline’ is mentioned to make sure that the plots are displayed in the notebook.

>>> import numpy as np
>>> import pandas as pd
>>> %matplotlib inline

For the purpose of understanding, a dataset is taken which has random values.

>>> df1 = pd.read_csv('dataset2.csv')
>>> df1.head()
Image for post
Image for post

How to create a histogram plot?

A histogram plot can be generated by using the method ‘hist’ on a column of a dataframe. The number of bins can also be specified.

>>> df1['b'].hist(bins=15)


A guide to understanding and implementing seaborn to plot data for exploratory data analysis.

What is Seaborn?

Seaborn is a library that is used for statistical plotting. This library is built on top of Matplotlib. It has many default styling options and also works well with Pandas.

To know more about Matplotlib, kindly check my article here.

How to install Seaborn?

To install using pip:pip install seaborn

To install using Anaconda:conda install seaborn

How to import Seaborn?

Seaborn is imported and along with it the magic function is mentioned below it to make sure that the plots generated are inline and displayed in the notebook.

>>> import seaborn as sns
>>> %matplotlib inline

How to load dataset from Seaborn?

Seaborn has inbuilt datasets which can be used. So the ‘tips’ dataset will be used here. This dataset has information of how much tip is given on the total bill. …


A guide to performing data visualization using Matplotlib for EDA.

What is Matplotlib?

Matplotlib is a very well known and widely used library for Python. It helps in the visualization of the data which is analyzed using Numpy and Pandas. It is a very useful library for generating 2D and 3D figures.

To know about Numpy and Pandas, refer to my articles here and here respectively.

How to install Matplotlib?

To install using pip:

pip install matplotlib

To install using Anaconda:

conda install matplotlib

How to import the library?

>>> import matplotlib.pyplot as plt

If using jupyter notebooks, then the below line is useful to display the figure inside the jupyter notebook. Incase not using notebooks, then after the code, you have to mention plt.show() …


A detailed guide with code to understand and practically implement Pandas when dealing with data.

What is Pandas?

Pandas is an open-source library that is used for data processing tasks like cleaning and preparation. It paves way for fast analysis of data and also has techniques for visualizing the data. It is built on top of the NumPy library.

To know more about the NumPy library, check my article here.

How to install Pandas?

  1. Through command line using pip

pip install pandas

2. Through command line using Anaconda

conda install pandas

What is the series datatype of Pandas?

Series is in resemblance to a NumPy array but the difference is that series can be accessed by labels or it can be indexed by labels. …


A guide to learn and implement NumPy from basic to advanced level for exploratory data analysis when dealing with data.

What is NumPy?

NumPy is a library of Python that will help in analyzing the data. It is used by individuals who deal with data science. It is a linear algebra library that has bindings to C libraries making it really fast.

How to install NumPy?

To install NumPy using pip:

pip install numpy

To install Numpy using Anaconda:

conda install numpy

What are NumPy Arrays?

While working with NumPy for data science, mostly we have to deal with NumPy arrays. These arrays are of two types:

  1. Matrices

Matrices are usually two-dimensional but they can still have either only one row or one column.

2. Vectors

Vectors on the other hand are strictly one-dimensional. …

About

Jayashree domala

Self-driven woman who wishes to deliver creative and engaging ideas and solutions in the field of technology.

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