percentage calcuation

Python Pandas Pivot Table Index location Percentage calculation on Two columns

pivot table for year on year This is a quick example of how to use pivot_table,  to calculate year on year percentage sales . In [162]: import sqlalchemy import pyodbc import numpy as np from pandas import DataFrame from bokeh.plotting import figure, output_file, show import pandas as pd   In [163]: df = DataFrame ## connect to…