I am new to Python , and I know is somehow a basic question but has taken my time for a while.
I have table with four columns as date, time, flow, dayType
which show how many cars pass some area in specific times in two days(2018-10-05
,2018-10-12
) .
Now I want to plot the corresponding flow of each day base on the time on same plot(axes) to compare these days , but the only things I get is an empty plot without showing any diagram!
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from numpy import split
%matplotlib inline
sns.set()
data = pd.read_excel('friday_frame.xlsx', names=['date', 'time', 'flow', 'dayType'])
fig, ax = plt.subplots(figsize=(12, 4))
dataPivot = pd.pivot_table(data, values='flow', index='time', columns='date').plot()
plt.ylabel('flows');