Data Visulization - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Data Visulization (/thread-21286.html) |
Data Visulization - srikanthpdpl - Sep-23-2019 Here is my code import pandas as pd import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt # [Example] Read datasets data = pd.read_csv("A2/sales.csv",sep=',',usecols=[1,2,3]) # 1- Year , 2 -Month, 3 - sales #print(data) df = pd.DataFrame(data) df = df.groupby('year').sum() print(df) maxs = df.max() print(maxs)I am not able to display the Year in which Maximum sales happen , but Max sales are coming. I do want this to be visualizedd in graph something like f,(axis1,axis2) = matplotlib.pyplot.subplots(nrows=2, ncols=1) |